From 230d4377c90c2c66d6bd95918f34148a2ca75c07 Mon Sep 17 00:00:00 2001 From: Henrik Brix Andersen Date: Tue, 12 Jun 2012 23:46:50 +0200 Subject: [PATCH 1/3] Fix display of special menu items (wxID_ABOUT, wxID_EXIT) on OS X --- lib/Slic3r/GUI.pm | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/Slic3r/GUI.pm b/lib/Slic3r/GUI.pm index 600708bfb..4e511017a 100644 --- a/lib/Slic3r/GUI.pm +++ b/lib/Slic3r/GUI.pm @@ -29,9 +29,6 @@ sub OnInit { # menubar my $menubar = Wx::MenuBar->new; - $frame->SetMenuBar($menubar); - EVT_MENU($frame, wxID_EXIT, sub {$_[0]->Close(1)}); - EVT_MENU($frame, wxID_ABOUT, \&About); # status bar $frame->{statusbar} = Slic3r::GUI::ProgressStatusBar->new($frame, -1); @@ -55,6 +52,17 @@ sub OnInit { EVT_MENU($frame, 4, sub { $panel->do_slice(reslice => 1) }); EVT_MENU($frame, 5, sub { $panel->do_slice(save_as => 1) }); EVT_MENU($frame, 6, sub { $panel->do_slice(save_as => 1, export_svg => 1) }); + EVT_MENU($frame, wxID_EXIT, sub {$_[0]->Close(1)}); + + # Help menu + my $helpMenu = Wx::Menu->new; + $helpMenu->Append(wxID_ABOUT, "&About"); + $menubar->Append($helpMenu, "&Help"); + EVT_MENU($frame, wxID_ABOUT, \&About); + + # Set the menubar after appending items, otherwise special items + # will not be handled correctly + $frame->SetMenuBar($menubar); $box->SetSizeHints($frame); $frame->SetSizer($box); From 65d6a8367215779b27867bf97c4da4b4471b36e1 Mon Sep 17 00:00:00 2001 From: Henrik Brix Andersen Date: Tue, 12 Jun 2012 23:47:59 +0200 Subject: [PATCH 2/3] wxID_EXIT is already imported, no need to specify package name --- lib/Slic3r/GUI.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Slic3r/GUI.pm b/lib/Slic3r/GUI.pm index 4e511017a..c8796f979 100644 --- a/lib/Slic3r/GUI.pm +++ b/lib/Slic3r/GUI.pm @@ -44,7 +44,7 @@ sub OnInit { $fileMenu->Append(5, "Slice and Save As…"); $fileMenu->Append(6, "Export SVG…"); $fileMenu->AppendSeparator(); - $fileMenu->Append(&Wx::wxID_EXIT, "&Quit"); + $fileMenu->Append(wxID_EXIT, "&Quit"); $menubar->Append($fileMenu, "&File"); EVT_MENU($frame, 1, sub { $panel->save_config }); EVT_MENU($frame, 2, sub { $panel->load_config }); From 3aa901f14999070fe587f039e1d852d86356ee13 Mon Sep 17 00:00:00 2001 From: Henrik Brix Andersen Date: Tue, 12 Jun 2012 23:51:59 +0200 Subject: [PATCH 3/3] Show version and description in About dialog --- lib/Slic3r/GUI.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Slic3r/GUI.pm b/lib/Slic3r/GUI.pm index c8796f979..3f5bb22c3 100644 --- a/lib/Slic3r/GUI.pm +++ b/lib/Slic3r/GUI.pm @@ -78,6 +78,8 @@ sub About { my $info = Wx::AboutDialogInfo->new; $info->SetName('Slic3r'); $info->AddDeveloper('Alessandro Ranellucci'); + $info->SetVersion($Slic3r::VERSION); + $info->SetDescription('STL-to-GCODE translator for RepRap printers'); Wx::AboutBox($info); }