OSX dock menu items
This commit is contained in:
parent
a8fda7d2f1
commit
4ec5ea34bf
@ -57,24 +57,23 @@ public:
|
||||
#if 0
|
||||
wxMenu *CreatePopupMenu() override {
|
||||
wxMenu *menu = new wxMenu;
|
||||
int id;
|
||||
auto *item = menu->Append(id = wxNewId(), "&Test menu");
|
||||
menu->Bind(wxEVT_MENU, [this](wxCommandEvent &) { wxMessageBox("Test menu - PrusaSlicer"); }, id);
|
||||
append_menu_item(menu, wxID_ANY, _L("Open new instance"), _L("Open a new PrusaSlicer instance"),
|
||||
[this](wxCommandEvent&) { start_new_slicer(); }, "", nullptr, [this]() {return wxGetApp().app_config->get("single_instance") != "1"; });
|
||||
append_menu_item(menu, wxID_ANY, _L("G-code preview") + dots, _L("Open G-code viewer"),
|
||||
[this](wxCommandEvent&) { start_new_gcodeviewer_open_file(); }, "", nullptr);
|
||||
return menu;
|
||||
}
|
||||
#endif
|
||||
};
|
||||
class GCodeViewerTaskBarIcon : public wxTaskBarIcon
|
||||
{
|
||||
public:
|
||||
GCodeViewerTaskBarIcon(wxTaskBarIconType iconType = wxTBI_DEFAULT_TYPE) : wxTaskBarIcon(iconType) {}
|
||||
wxMenu *CreatePopupMenu() override {
|
||||
wxMenu *menu = new wxMenu;
|
||||
//int id;
|
||||
//auto *item = menu->Append(id = wxNewId(), "&Test menu");
|
||||
//menu->Bind(wxEVT_MENU, [this](wxCommandEvent &) { wxMessageBox("Test menu - GCode Viewer"); }, id);
|
||||
append_menu_item(menu, wxID_ANY, _L("Open PrusaSlicer"), _L(""),
|
||||
wxMenu* CreatePopupMenu() override {
|
||||
wxMenu* menu = new wxMenu;
|
||||
append_menu_item(menu, wxID_ANY, _L("Open PrusaSlicer"), _L("Open a new PrusaSlicer instance"),
|
||||
[this](wxCommandEvent&) { start_new_slicer(nullptr, true); }, "", nullptr);
|
||||
append_menu_item(menu, wxID_ANY, _L("G-code preview") + dots, _L("Open new G-code viewer"),
|
||||
[this](wxCommandEvent&) { start_new_gcodeviewer_open_file(); }, "", nullptr);
|
||||
return menu;
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user