From 90f66ea9b92c7ba42857b1ffbcc2c01b3925c571 Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Thu, 28 Sep 2017 07:49:09 -0500 Subject: [PATCH] Allows hiding of the Controller tab (controller tab still defaults to visible). Fixes #3984 --- lib/Slic3r/GUI.pm | 1 + lib/Slic3r/GUI/MainFrame.pm | 3 ++- lib/Slic3r/GUI/Preferences.pm | 7 +++++++ share/locale/ja/slic3r.mo | Bin 0 -> 630 bytes 4 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 share/locale/ja/slic3r.mo diff --git a/lib/Slic3r/GUI.pm b/lib/Slic3r/GUI.pm index c828c9576..d473eef07 100644 --- a/lib/Slic3r/GUI.pm +++ b/lib/Slic3r/GUI.pm @@ -89,6 +89,7 @@ our $Settings = { threads => $Slic3r::Config::Options->{threads}{default}, color_toolpaths_by => 'role', tabbed_preset_editors => 1, + show_host => 0, }, }; diff --git a/lib/Slic3r/GUI/MainFrame.pm b/lib/Slic3r/GUI/MainFrame.pm index d7b5e748c..a61ad5f66 100644 --- a/lib/Slic3r/GUI/MainFrame.pm +++ b/lib/Slic3r/GUI/MainFrame.pm @@ -115,7 +115,8 @@ sub _init_tabpanel { }); $panel->AddPage($self->{plater} = Slic3r::GUI::Plater->new($panel), "Plater"); - $panel->AddPage($self->{controller} = Slic3r::GUI::Controller->new($panel), "Controller"); + $panel->AddPage($self->{controller} = Slic3r::GUI::Controller->new($panel), "Controller") + if ($Slic3r::GUI::Settings->{_}{show_host}); } sub _init_menubar { diff --git a/lib/Slic3r/GUI/Preferences.pm b/lib/Slic3r/GUI/Preferences.pm index c7d8a84bb..c995258bb 100644 --- a/lib/Slic3r/GUI/Preferences.pm +++ b/lib/Slic3r/GUI/Preferences.pm @@ -71,6 +71,13 @@ sub new { tooltip => 'When opening a profile editor, it will be shown in a dialog or in a tab according to this option.', default => $Slic3r::GUI::Settings->{_}{tabbed_preset_editors}, )); + $optgroup->append_single_option_line(Slic3r::GUI::OptionsGroup::Option->new( + opt_id => 'show_host', + type => 'bool', + label => 'Show Controller Tab (requires restart)', + tooltip => 'Shows/Hides the Controller Tab. Requires a restart of Slic3r.', + default => $Slic3r::GUI::Settings->{_}{show_host}, + )); my $sizer = Wx::BoxSizer->new(wxVERTICAL); $sizer->Add($optgroup->sizer, 0, wxEXPAND | wxBOTTOM | wxLEFT | wxRIGHT, 10); diff --git a/share/locale/ja/slic3r.mo b/share/locale/ja/slic3r.mo new file mode 100644 index 0000000000000000000000000000000000000000..2f7d7b8bde46c5b1b744986f67224270890ec125 GIT binary patch literal 630 zcmZvZO-{ow5QW38JnK~|-?u^E%2%v{%$gU>J)9SCht?^h#ljJ0SAFPMl%5XZM0yl#kH?3=_hGNa z;v>P2fHyfOBi!JtntlAQFK*Vpu5=z~uXdI6#tIg8r5;Y?5TTE9^s5)_MTVE>m+3N8 z+~8ryXpfp^ypJi2$ElCTl~g)mc`2WDvkF7W-$*ur&{^MVyPNIW{9xYE2mDm^g2=Ag8BnNcR-f=ylI eY#vqWd6DU7VsGh-1tUYa_}S3Q(lkB!(|rTMiL;yl literal 0 HcmV?d00001