mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-05-26 08:07:44 +08:00
fix of OSX dock menu items
This commit is contained in:
parent
4ec5ea34bf
commit
1b2dcabf94
@ -54,9 +54,11 @@ class PrusaSlicerTaskBarIcon : public wxTaskBarIcon
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PrusaSlicerTaskBarIcon(wxTaskBarIconType iconType = wxTBI_DEFAULT_TYPE) : wxTaskBarIcon(iconType) {}
|
PrusaSlicerTaskBarIcon(wxTaskBarIconType iconType = wxTBI_DEFAULT_TYPE) : wxTaskBarIcon(iconType) {}
|
||||||
#if 0
|
|
||||||
wxMenu *CreatePopupMenu() override {
|
wxMenu *CreatePopupMenu() override {
|
||||||
wxMenu *menu = new wxMenu;
|
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"),
|
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"; });
|
[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"),
|
append_menu_item(menu, wxID_ANY, _L("G-code preview") + dots, _L("Open G-code viewer"),
|
||||||
@ -68,8 +70,11 @@ class GCodeViewerTaskBarIcon : public wxTaskBarIcon
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
GCodeViewerTaskBarIcon(wxTaskBarIconType iconType = wxTBI_DEFAULT_TYPE) : wxTaskBarIcon(iconType) {}
|
GCodeViewerTaskBarIcon(wxTaskBarIconType iconType = wxTBI_DEFAULT_TYPE) : wxTaskBarIcon(iconType) {}
|
||||||
wxMenu* CreatePopupMenu() override {
|
wxMenu *CreatePopupMenu() override {
|
||||||
wxMenu* menu = new wxMenu;
|
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("Open a new PrusaSlicer instance"),
|
append_menu_item(menu, wxID_ANY, _L("Open PrusaSlicer"), _L("Open a new PrusaSlicer instance"),
|
||||||
[this](wxCommandEvent&) { start_new_slicer(nullptr, true); }, "", nullptr);
|
[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"),
|
append_menu_item(menu, wxID_ANY, _L("G-code preview") + dots, _L("Open new G-code viewer"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user