Merge pull request #12496 from mikeykhalil/8952-ignore-tray-double-click-events
8952 option to ignore tray double click events
This commit is contained in:
commit
9488ef4867
6 changed files with 66 additions and 3 deletions
|
@ -176,6 +176,20 @@ void Tray::SetHighlightMode(TrayIcon::HighlightMode mode) {
|
|||
tray_icon_->SetHighlightMode(mode);
|
||||
}
|
||||
|
||||
void Tray::SetIgnoreDoubleClickEvents(bool ignore) {
|
||||
#if defined(OS_MACOSX)
|
||||
tray_icon_->SetIgnoreDoubleClickEvents(ignore);
|
||||
#endif
|
||||
}
|
||||
|
||||
bool Tray::GetIgnoreDoubleClickEvents() {
|
||||
#if defined(OS_MACOSX)
|
||||
return tray_icon_->GetIgnoreDoubleClickEvents();
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
void Tray::DisplayBalloon(mate::Arguments* args,
|
||||
const mate::Dictionary& options) {
|
||||
mate::Handle<NativeImage> icon;
|
||||
|
@ -224,6 +238,10 @@ void Tray::BuildPrototype(v8::Isolate* isolate,
|
|||
.SetMethod("setToolTip", &Tray::SetToolTip)
|
||||
.SetMethod("setTitle", &Tray::SetTitle)
|
||||
.SetMethod("setHighlightMode", &Tray::SetHighlightMode)
|
||||
.SetMethod("setIgnoreDoubleClickEvents",
|
||||
&Tray::SetIgnoreDoubleClickEvents)
|
||||
.SetMethod("getIgnoreDoubleClickEvents",
|
||||
&Tray::GetIgnoreDoubleClickEvents)
|
||||
.SetMethod("displayBalloon", &Tray::DisplayBalloon)
|
||||
.SetMethod("popUpContextMenu", &Tray::PopUpContextMenu)
|
||||
.SetMethod("setContextMenu", &Tray::SetContextMenu)
|
||||
|
|
|
@ -70,6 +70,8 @@ class Tray : public mate::TrackableObject<Tray>, public TrayIconObserver {
|
|||
void SetToolTip(const std::string& tool_tip);
|
||||
void SetTitle(const std::string& title);
|
||||
void SetHighlightMode(TrayIcon::HighlightMode mode);
|
||||
void SetIgnoreDoubleClickEvents(bool ignore);
|
||||
bool GetIgnoreDoubleClickEvents();
|
||||
void DisplayBalloon(mate::Arguments* args, const mate::Dictionary& options);
|
||||
void PopUpContextMenu(mate::Arguments* args);
|
||||
void SetContextMenu(v8::Isolate* isolate, mate::Handle<Menu> menu);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue