New --post-process option. Includes some cleaning of the STDOUT messages

This commit is contained in:
Alessandro Ranellucci
2012-02-20 12:50:05 +01:00
parent ae35df716f
commit 555c23069d
10 changed files with 63 additions and 28 deletions

View File

@@ -33,7 +33,7 @@ sub new {
$bold_font->SetPointSize($label->GetFont()->GetPointSize());
$label->SetFont($bold_font) if $opt->{important};
my $field;
if ($opt->{type} =~ /^(i|f|s)$/) {
if ($opt->{type} =~ /^(i|f|s|s@)$/) {
my $style = 0;
my $size = Wx::wxDefaultSize;
@@ -42,10 +42,12 @@ sub new {
$size = Wx::Size->new($opt->{width} || -1, $opt->{height} || -1);
}
$field = Wx::TextCtrl->new($parent, -1, Slic3r::Config->get($opt_key),
my ($get, $set) = $opt->{type} eq 's@' ? qw(serialize deserialize) : qw(get set);
$field = Wx::TextCtrl->new($parent, -1, Slic3r::Config->$get($opt_key),
Wx::wxDefaultPosition, $size, $style);
EVT_TEXT($parent, $field, sub { Slic3r::Config->set($opt_key, $field->GetValue) });
push @reload_callbacks, sub { $field->SetValue(Slic3r::Config->get($opt_key)) };
EVT_TEXT($parent, $field, sub { Slic3r::Config->$set($opt_key, $field->GetValue) });
push @reload_callbacks, sub { $field->SetValue(Slic3r::Config->$get($opt_key)) };
} elsif ($opt->{type} eq 'bool') {
$field = Wx::CheckBox->new($parent, -1, "");
$field->SetValue(Slic3r::Config->get($opt_key));

View File

@@ -57,7 +57,7 @@ sub new {
},
gcode => {
title => 'Custom GCODE',
options => [qw(start_gcode end_gcode gcode_comments)],
options => [qw(start_gcode end_gcode gcode_comments post_process)],
},
extrusion => {
title => 'Extrusion',
@@ -181,7 +181,7 @@ sub do_slice {
status_cb => sub {
my ($percent, $message) = @_;
if (&Wx::wxVERSION_STRING =~ / 2\.(8\.|9\.[2-9])/) {
$process_dialog->Update($percent, $message);
$process_dialog->Update($percent, "$message...");
}
},
);