]> granicus.if.org Git - handbrake/commitdiff
MacGUI: Remove the "toolbar" variable from Controller. Patch by blindjimmy.
authorritsuka <damiog@gmail.com>
Sat, 26 Apr 2008 11:19:37 +0000 (11:19 +0000)
committerritsuka <damiog@gmail.com>
Sat, 26 Apr 2008 11:19:37 +0000 (11:19 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1446 b64f7644-9d1e-0410-96f1-a4d463321fa5

macosx/Controller.h
macosx/Controller.mm

index a1394d79921787a66499ddd2c93b9c0777c1107e..d932720b459bd2425dd66c77d1e9c5b6c4d36c01 100644 (file)
@@ -29,8 +29,7 @@ BOOL                        fIsDragging;
 @interface HBController : NSObject <GrowlApplicationBridgeDelegate>
 {
     IBOutlet NSWindow            * fWindow;
-    NSToolbar                    * toolbar;
-    
+
     /* Main Menu Outlets */
     NSMenuItem                   * fOpenSourceTitleMMenu;
     
index 5dfe3f7a172603fc7eedec1fe696a690c5107983..ac83d40c144616e6676c59d94f733b62e622e8d6 100644 (file)
@@ -491,7 +491,7 @@ static NSString *        ChooseSourceIdentifier             = @"Choose Source It
             break;
                }
 #undef p
-       
+
 #define p s.param.scandone
         case HB_STATE_SCANDONE:
         {
@@ -499,11 +499,11 @@ static NSString *        ChooseSourceIdentifier             = @"Choose Source It
             [fScanIndicator setDoubleValue: 0.0];
             [fScanIndicator setHidden: YES];
                        [self showNewScan: NULL];
-            [toolbar validateVisibleItems];
+            [[fWindow toolbar] validateVisibleItems];
                        break;
         }
 #undef p
-                       
+
 #define p s.param.working
         case HB_STATE_WORKING:
         {
@@ -594,7 +594,7 @@ static NSString *        ChooseSourceIdentifier             = @"Choose Source It
             // HB_STATE_WORKDONE happpens as a result of libhb finishing all its jobs
             // or someone calling hb_stop. In the latter case, hb_stop does not clear
             // out the remaining passes/jobs in the queue. We'll do that here.
-                        
+
             // Delete all remaining jobs of this encode.
             hb_job_t * job;
             while( ( job = hb_job( fHandle, 0 ) ) && ( !IsFirstPass(job->sequence_id) ) )
@@ -603,7 +603,7 @@ static NSString *        ChooseSourceIdentifier             = @"Choose Source It
             [fStatusField setStringValue: NSLocalizedString( @"Done.", @"" )];
             [fRipIndicator setIndeterminate: NO];
             [fRipIndicator setDoubleValue: 0.0];
-            [toolbar validateVisibleItems];
+            [[fWindow toolbar] validateVisibleItems];
 
             /* Restore dock icon */
             [self UpdateDockIcon: -1.0];
@@ -711,14 +711,14 @@ static NSString *        ChooseSourceIdentifier             = @"Choose Source It
 // ============================================================
 
 - (void) setupToolbar {
-    toolbar = [[[NSToolbar alloc] initWithIdentifier: @"HandBrake Toolbar"] autorelease];
-    
+    NSToolbar *toolbar = [[[NSToolbar alloc] initWithIdentifier: @"HandBrake Toolbar"] autorelease];
+
     [toolbar setAllowsUserCustomization: YES];
     [toolbar setAutosavesConfiguration: YES];
     [toolbar setDisplayMode: NSToolbarDisplayModeIconAndLabel];
-    
+
     [toolbar setDelegate: self];
-    
+
     [fWindow setToolbar: toolbar];
 }
 
@@ -1307,11 +1307,11 @@ static NSString *        ChooseSourceIdentifier             = @"Choose Source It
         which we use at the end of this function to tell the gui
         if this is the first successful scan since launch and whether
         or not we should set all settings to the defaults */
-               
+
         currentSuccessfulScanCount++;
-        
-        [toolbar validateVisibleItems];
-               
+
+        [[fWindow toolbar] validateVisibleItems];
+
                [fSrcTitlePopUp removeAllItems];
                for( int i = 0; i < hb_list_count( list ); i++ )
                {