]> granicus.if.org Git - handbrake/commitdiff
macGui: Encode Done Notification initial implementation
authordynaflash <dynaflashtech@gmail.com>
Thu, 26 Apr 2007 16:03:10 +0000 (16:03 +0000)
committerdynaflash <dynaflashtech@gmail.com>
Thu, 26 Apr 2007 16:03:10 +0000 (16:03 +0000)
- 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

macosx/Controller.mm
macosx/ScanController.mm

index ac2f6cbc7339169ec08f57c20dbde6c60ce08576..8bfd7cb231c26a4b610cbc90a7f7bb8f17cd6245 100644 (file)
@@ -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);
     
index cad783377c8d5e818ded674359435720fcd37b81..937b177fae58e77117e45dce259d6417391cacd1 100644 (file)
 
        [fDetectedPopUp selectItemAtIndex: 0];
 
-    /*
-       if( [fMatrix isEnabled] )
-    {
-        [self EnableUI: YES];
-    }
-    */
 }
 
 - (void) EnableUI: (bool) b