Rename soundName → sound.
This commit is contained in:
parent
0cfae1cc2b
commit
2b9b186fd1
5 changed files with 11 additions and 11 deletions
|
@ -67,7 +67,7 @@ Notification::Notification(v8::Isolate* isolate,
|
|||
opts.Get("replyPlaceholder", &reply_placeholder_);
|
||||
opts.Get("hasReply", &has_reply_);
|
||||
opts.Get("actions", &actions_);
|
||||
opts.Get("soundName", &sound_name_);
|
||||
opts.Get("sound", &sound_);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -115,7 +115,7 @@ std::vector<brightray::NotificationAction> Notification::GetActions() const {
|
|||
}
|
||||
|
||||
base::string16 Notification::GetSoundName() const {
|
||||
return sound_name_;
|
||||
return sound_;
|
||||
}
|
||||
|
||||
// Setters
|
||||
|
@ -148,8 +148,8 @@ void Notification::SetActions(
|
|||
actions_ = actions;
|
||||
}
|
||||
|
||||
void Notification::SetSoundName(const base::string16& new_sound_name) {
|
||||
sound_name_ = new_sound_name;
|
||||
void Notification::SetSoundName(const base::string16& new_sound) {
|
||||
sound_ = new_sound;
|
||||
}
|
||||
|
||||
void Notification::NotificationAction(int index) {
|
||||
|
@ -190,7 +190,7 @@ void Notification::Show() {
|
|||
options.has_reply = has_reply_;
|
||||
options.reply_placeholder = reply_placeholder_;
|
||||
options.actions = actions_;
|
||||
options.sound_name = sound_name_;
|
||||
options.sound = sound_;
|
||||
notification_->Show(options);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ class Notification : public mate::TrackableObject<Notification>,
|
|||
void SetReplyPlaceholder(const base::string16& new_reply_placeholder);
|
||||
void SetHasReply(bool new_has_reply);
|
||||
void SetActions(const std::vector<brightray::NotificationAction>& actions);
|
||||
void SetSoundName(const base::string16& sound_name);
|
||||
void SetSoundName(const base::string16& sound);
|
||||
|
||||
private:
|
||||
base::string16 title_;
|
||||
|
@ -77,7 +77,7 @@ class Notification : public mate::TrackableObject<Notification>,
|
|||
base::string16 reply_placeholder_;
|
||||
bool has_reply_ = false;
|
||||
std::vector<brightray::NotificationAction> actions_;
|
||||
base::string16 sound_name_;
|
||||
base::string16 sound_;
|
||||
|
||||
brightray::NotificationPresenter* presenter_;
|
||||
|
||||
|
|
|
@ -39,8 +39,8 @@ void CocoaNotification::Show(const NotificationOptions& options) {
|
|||
|
||||
if (options.silent) {
|
||||
[notification_ setSoundName:nil];
|
||||
} else if (options.sound_name != nil) {
|
||||
[notification_ setSoundName:base::SysUTF16ToNSString(options.sound_name)];
|
||||
} else if (options.sound != nil) {
|
||||
[notification_ setSoundName:base::SysUTF16ToNSString(options.sound)];
|
||||
} else {
|
||||
[notification_ setSoundName:NSUserNotificationDefaultSoundName];
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ struct NotificationOptions {
|
|||
bool silent;
|
||||
bool has_reply;
|
||||
base::string16 reply_placeholder;
|
||||
base::string16 sound_name;
|
||||
base::string16 sound;
|
||||
std::vector<NotificationAction> actions;
|
||||
};
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ Returns `Boolean` - Whether or not desktop notifications are supported on the cu
|
|||
* `icon` [NativeImage](native-image.md) - (optional) An icon to use in the notification
|
||||
* `hasReply` Boolean - (optional) Whether or not to add an inline reply option to the notification. _macOS_
|
||||
* `replyPlaceholder` String - (optional) The placeholder to write in the inline reply input field. _macOS_
|
||||
* `soundName` String - (optional) The name of the sound file to play when the notification is shown. _macOS_
|
||||
* `sound` String - (optional) The name of the sound file to play when the notification is shown. _macOS_
|
||||
* `actions` [NotificationAction[]](structures/notification-action.md) - (optional) Actions to add to the notification. Please read the available actions and limitations in the `NotificationAction` documentation _macOS_
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue