mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 20:21:12 -06:00 
			
		
		
		
	Merge pull request #190 from henrikbrixandersen/master
Add Growl support
This commit is contained in:
		
						commit
						e84ffa83e3
					
				
					 1 changed files with 8 additions and 0 deletions
				
			
		|  | @ -69,6 +69,12 @@ sub new { | |||
|     ); | ||||
|     $self->{panels} = \%panels; | ||||
| 
 | ||||
|     if (eval "use Growl::GNTP; 1") { | ||||
|         # register growl notifications | ||||
|         $self->{growler} = Growl::GNTP->new(AppName => 'Slic3r'); #, AppIcon => "path/to/my/icon.gif"); | ||||
|         $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 { | ||||
|         my @cols = @_; | ||||
|  | @ -191,6 +197,8 @@ sub do_slice { | |||
|             my $message = sprintf "%s was successfully sliced in %d minutes and %.3f seconds.", | ||||
|                 $input_file_basename, int($skein->processing_time/60), | ||||
|                 $skein->processing_time - int($skein->processing_time/60)*60; | ||||
|             $self->{growler}->notify(Event => 'SKEIN_DONE', Title => 'Slicing Done!', Message => $message) | ||||
|                 if ($self->{growler}); | ||||
|             Wx::MessageDialog->new($self, $message, 'Done!',  | ||||
|                 wxOK | wxICON_INFORMATION)->ShowModal; | ||||
|         } else { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Alessandro Ranellucci
						Alessandro Ranellucci