From: dynaflash Date: Thu, 26 Apr 2007 16:03:10 +0000 (+0000) Subject: macGui: Encode Done Notification initial implementation X-Git-Tag: 0.9.0~282 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=73c2865afee53a5240b3fbff1f417e56a03b9551;p=handbrake macGui: Encode Done Notification initial implementation - System alert sound as well as an NSAlert window to notify the user their encode is completed. - No dock icon bounce yet. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@553 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- diff --git a/macosx/Controller.mm b/macosx/Controller.mm index ac2f6cbc7..8bfd7cb23 100644 --- a/macosx/Controller.mm +++ b/macosx/Controller.mm @@ -522,27 +522,36 @@ static int FormatSettings[3][4] = case HB_STATE_WORKDONE: { - [self EnableUI: YES]; + //[self EnableUI: YES]; [fStatusField setStringValue: _( @"Done." )]; [fRipIndicator setIndeterminate: NO]; [fRipIndicator setDoubleValue: 0.0]; [fRipButton setTitle: _( @"Start" )]; - + /* Restore dock icon */ [self UpdateDockIcon: -1.0]; - + [fPauseButton setEnabled: NO]; [fPauseButton setTitle: _( @"Pause" )]; [fRipButton setEnabled: YES]; [fRipButton setTitle: _( @"Start" )]; - + /* FIXME */ hb_job_t * job; while( ( job = hb_job( fHandle, 0 ) ) ) { hb_rem( fHandle, job ); } - break; + + /* Lets alert the user that the encode has finished */ + int status; + NSBeep(); + status = NSRunAlertPanel(@"Put down that cocktail...",@"your HandBrake encode is done!", @"OK", nil, nil); + if ( status == NSAlertDefaultReturn ) + { + [self EnableUI: YES]; + } + break; } } @@ -2298,6 +2307,7 @@ the user is using "Custom" settings by determining the sender*/ return; /* Alert user before deleting preset */ /* Comment out for now, tie to user pref eventually */ + //NSBeep(); status = NSRunAlertPanel(@"Warning!", @"Are you sure that you want to delete the selected preset?", @"OK", @"Cancel", nil); diff --git a/macosx/ScanController.mm b/macosx/ScanController.mm index cad783377..937b177fa 100644 --- a/macosx/ScanController.mm +++ b/macosx/ScanController.mm @@ -96,12 +96,6 @@ [fDetectedPopUp selectItemAtIndex: 0]; - /* - if( [fMatrix isEnabled] ) - { - [self EnableUI: YES]; - } - */ } - (void) EnableUI: (bool) b