Add menu parameter for Tray.popUpContextMenu

This commit is contained in:
Cheng Zhao 2015-12-02 18:43:11 +08:00
parent 202475f5a9
commit 2fba05b5e7
8 changed files with 23 additions and 10 deletions

View file

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