mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-14 18:27:58 -06:00
Move Growl::GNTP handling to Slic3r::GUI to allow notifications from both Slic3r::GUI::SkeinPanel and Slic3r::GUI::Plater.
This commit is contained in:
parent
3c66ea3134
commit
129f0fa904
3 changed files with 21 additions and 17 deletions
|
@ -86,14 +86,6 @@ sub new {
|
|||
},
|
||||
);
|
||||
$self->{panels} = \%panels;
|
||||
|
||||
if (eval "use Growl::GNTP; 1") {
|
||||
# register growl notifications
|
||||
eval {
|
||||
$self->{growler} = Growl::GNTP->new(AppName => 'Slic3r', AppIcon => "$Slic3r::var/Slic3r.png");
|
||||
$self->{growler}->register([{Name => 'SKEIN_DONE', DisplayName => 'Slicing Done'}]);
|
||||
};
|
||||
}
|
||||
|
||||
my $tabpanel = Wx::Notebook->new($self, -1, Wx::wxDefaultPosition, Wx::wxDefaultSize, &Wx::wxNB_TOP);
|
||||
my $make_tab = sub {
|
||||
|
@ -272,10 +264,7 @@ sub do_slice {
|
|||
$print->processing_time - int($print->processing_time/60)*60
|
||||
if $print->processing_time;
|
||||
$message .= ".";
|
||||
eval {
|
||||
$self->{growler}->notify(Event => 'SKEIN_DONE', Title => 'Slicing Done!', Message => $message)
|
||||
if ($self->{growler});
|
||||
};
|
||||
Slic3r::GUI::notify($message);
|
||||
Wx::MessageDialog->new($self, $message, 'Done!',
|
||||
wxOK | wxICON_INFORMATION)->ShowModal;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue