From 242dc176802c0164242a3df93273b3b7afbe0487 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Mon, 29 Dec 2014 11:45:09 +0100 Subject: [PATCH] Minor improvements to Octoprint integration --- lib/Slic3r/GUI/Plater.pm | 6 ++++-- lib/Slic3r/GUI/Tab.pm | 3 ++- var/zoom.png | Bin 0 -> 692 bytes 3 files changed, 6 insertions(+), 3 deletions(-) create mode 100755 var/zoom.png diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index cd5617778..fe754a044 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -195,7 +195,7 @@ sub new { reset cross.png arrange bricks.png export_gcode cog_go.png - send_gcode cog_go.png + send_gcode arrow_up.png export_stl brick_go.png increase add.png @@ -1124,7 +1124,9 @@ sub send_gcode { if ($res->is_success) { $self->statusbar->SetStatusText("G-code file successfully uploaded to the Octoprint server"); } else { - $self->statusbar->SetStatusText("Error while uploading to the Octoprint server: " . $res->status_line); + my $message = "Error while uploading to the Octoprint server: " . $res->status_line; + Slic3r::GUI::show_error($self, $message); + $self->statusbar->SetStatusText($message); } } diff --git a/lib/Slic3r/GUI/Tab.pm b/lib/Slic3r/GUI/Tab.pm index b5250f047..af7aae4fe 100644 --- a/lib/Slic3r/GUI/Tab.pm +++ b/lib/Slic3r/GUI/Tab.pm @@ -1007,7 +1007,7 @@ sub build { my $btn = Wx::Button->new($parent, -1, "Browse…", wxDefaultPosition, wxDefaultSize, wxBU_LEFT); $btn->SetFont($Slic3r::GUI::small_font); if ($Slic3r::GUI::have_button_icons) { - $btn->SetBitmap(Wx::Bitmap->new("$Slic3r::var/cog.png", wxBITMAP_TYPE_PNG)); + $btn->SetBitmap(Wx::Bitmap->new("$Slic3r::var/zoom.png", wxBITMAP_TYPE_PNG)); } if (!eval "use Net::Bonjour; 1") { @@ -1024,6 +1024,7 @@ sub build { $self->{config}->set('octoprint_host', $value); $self->update_dirty; $self->_on_value_change('octoprint_host', $value); + $self->reload_config; } }); diff --git a/var/zoom.png b/var/zoom.png new file mode 100755 index 0000000000000000000000000000000000000000..908612e394525fc2e52a7e9b94689c25ce167381 GIT binary patch literal 692 zcmV;l0!#ggP)m+BBgry{~j2fHLegbHP( zrgXNbr0}2;^nywdjLjZe?uxtrd3D(pZH@fFFc0{BW_~jxoO1w7-VX;6vK@ROA$$R6 zEmo;Ht-Mj|>5jUy{bQ^V5@53LRI8AgLpUm|m+15sqcz@QtVSo|oz7ArM8?pIn+>gN z0b=4_b5O|4A*;Q+vc9Vqr~%3V155*NV~@gTz}KSUiKB-uJzjMZ>5%Q#n24H!V{ zTY(LLAE*NAHZ}C#wnj%Bw5OFIkRhkkAW#kDC3j9Wm0YXRaXlyyp>#mVfYG)eC;@ab zDb=T-BCAY4LI(Z@GOTr2V_A{pRwSmz+8Be>CjAw(=gnbVWAeguvZa93JmL(EDxv1m z0OP4q=fpAK1Mq!C2`OkEn37o;m#wF#(t(8Pu#S?2f#x<~4EO{@fmm`p9veD6RZ_jp z@Au4};q&`XuKEYgIiB4((kgxOs#YdqJw0fY>9^K_agEu5+$#k;w#%I2N>n_?)YIqu z`tq&#_^p?-%K*U0^}|7+9U(&k0?s;=r=uCZ%)H9_edH8wK}gB(nUB1FFk+2Ol%BXV zHoFY`D~2x|2