mac: Implement menu parameter

This commit is contained in:
Cheng Zhao 2015-12-02 19:05:22 +08:00
parent 2fba05b5e7
commit 3cdd0f35c7
2 changed files with 21 additions and 4 deletions

View file

@ -137,11 +137,11 @@ void Tray::DisplayBalloon(mate::Arguments* args,
}
void Tray::PopUpContextMenu(mate::Arguments* args) {
Menu* menu = nullptr;
mate::Handle<Menu> menu;
args->GetNext(&menu);
gfx::Point pos;
args->GetNext(&pos);
tray_icon_->PopUpContextMenu(pos, menu ? menu->model() : nullptr);
tray_icon_->PopUpContextMenu(pos, menu.IsEmpty() ? nullptr : menu->model());
}
void Tray::SetContextMenu(mate::Arguments* args, Menu* menu) {