Minor improvements to Octoprint integration

This commit is contained in:
Alessandro Ranellucci 2014-12-29 11:45:09 +01:00
parent de2fd9721c
commit 242dc17680
3 changed files with 6 additions and 3 deletions

View File

@ -195,7 +195,7 @@ sub new {
reset cross.png reset cross.png
arrange bricks.png arrange bricks.png
export_gcode cog_go.png export_gcode cog_go.png
send_gcode cog_go.png send_gcode arrow_up.png
export_stl brick_go.png export_stl brick_go.png
increase add.png increase add.png
@ -1124,7 +1124,9 @@ sub send_gcode {
if ($res->is_success) { if ($res->is_success) {
$self->statusbar->SetStatusText("G-code file successfully uploaded to the Octoprint server"); $self->statusbar->SetStatusText("G-code file successfully uploaded to the Octoprint server");
} else { } 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);
} }
} }

View File

@ -1007,7 +1007,7 @@ sub build {
my $btn = Wx::Button->new($parent, -1, "Browse…", wxDefaultPosition, wxDefaultSize, wxBU_LEFT); my $btn = Wx::Button->new($parent, -1, "Browse…", wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
$btn->SetFont($Slic3r::GUI::small_font); $btn->SetFont($Slic3r::GUI::small_font);
if ($Slic3r::GUI::have_button_icons) { 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") { if (!eval "use Net::Bonjour; 1") {
@ -1024,6 +1024,7 @@ sub build {
$self->{config}->set('octoprint_host', $value); $self->{config}->set('octoprint_host', $value);
$self->update_dirty; $self->update_dirty;
$self->_on_value_change('octoprint_host', $value); $self->_on_value_change('octoprint_host', $value);
$self->reload_config;
} }
}); });

BIN
var/zoom.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 692 B