popContextMenu => popUpContextMenu
This commit is contained in:
parent
225140bd64
commit
33eadad139
10 changed files with 19 additions and 15 deletions
|
@ -120,10 +120,10 @@ void Tray::DisplayBalloon(mate::Arguments* args,
|
|||
tray_icon_->DisplayBalloon(icon, title, content);
|
||||
}
|
||||
|
||||
void Tray::PopContextMenu(mate::Arguments* args) {
|
||||
void Tray::PopUpContextMenu(mate::Arguments* args) {
|
||||
gfx::Point pos;
|
||||
args->GetNext(&pos);
|
||||
tray_icon_->PopContextMenu(pos);
|
||||
tray_icon_->PopUpContextMenu(pos);
|
||||
}
|
||||
|
||||
void Tray::SetContextMenu(mate::Arguments* args, Menu* menu) {
|
||||
|
@ -151,7 +151,7 @@ void Tray::BuildPrototype(v8::Isolate* isolate,
|
|||
.SetMethod("setTitle", &Tray::SetTitle)
|
||||
.SetMethod("setHighlightMode", &Tray::SetHighlightMode)
|
||||
.SetMethod("displayBalloon", &Tray::DisplayBalloon)
|
||||
.SetMethod("popContextMenu", &Tray::PopContextMenu)
|
||||
.SetMethod("popUpContextMenu", &Tray::PopUpContextMenu)
|
||||
.SetMethod("_setContextMenu", &Tray::SetContextMenu);
|
||||
}
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ class Tray : public mate::EventEmitter,
|
|||
void SetTitle(mate::Arguments* args, const std::string& title);
|
||||
void SetHighlightMode(mate::Arguments* args, bool highlight);
|
||||
void DisplayBalloon(mate::Arguments* args, const mate::Dictionary& options);
|
||||
void PopContextMenu(mate::Arguments* args);
|
||||
void PopUpContextMenu(mate::Arguments* args);
|
||||
void SetContextMenu(mate::Arguments* args, Menu* menu);
|
||||
|
||||
private:
|
||||
|
|
|
@ -3,8 +3,12 @@ bindings = process.atomBinding 'tray'
|
|||
|
||||
Tray = bindings.Tray
|
||||
Tray::__proto__ = EventEmitter.prototype
|
||||
|
||||
Tray::setContextMenu = (menu) ->
|
||||
@_setContextMenu menu
|
||||
@menu = menu # Keep a strong reference of menu.
|
||||
|
||||
# Keep compatibility with old APIs.
|
||||
Tray::popContextMenu = Tray::popUpContextMenu
|
||||
|
||||
module.exports = Tray
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue