]> granicus.if.org Git - handbrake/commitdiff
MacGui: Do not disable the ui if there is no reason to do so. Removed unused include.
authorritsuka <damiog@gmail.com>
Tue, 29 Jul 2008 08:42:48 +0000 (08:42 +0000)
committerritsuka <damiog@gmail.com>
Tue, 29 Jul 2008 08:42:48 +0000 (08:42 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1589 b64f7644-9d1e-0410-96f1-a4d463321fa5

macosx/Controller.mm

index a2c949f0f6b57a2cd3cc0a44c942d83a5ff20348..e87ae61a6443744970c7aafb89f47e3a6a66b34f 100644 (file)
@@ -4,17 +4,11 @@
    Homepage: <http://handbrake.fr/>.
    It may be used under the terms of the GNU General Public License. */
 
-#include "Controller.h"
-#include "a52dec/a52.h"
+#import "Controller.h"
 #import "HBOutputPanelController.h"
 #import "HBPreferencesController.h"
-/* Added to integrate scanning into HBController */
-#include <IOKit/IOKitLib.h>
-#include <IOKit/storage/IOMedia.h>
-#include <IOKit/storage/IODVDMedia.h>
-#include "HBDVDDetector.h"
-#include "dvdread/dvd_reader.h"
-#include "HBPresets.h"
+#import "HBDVDDetector.h"
+#import "HBPresets.h"
 
 #define DragDropSimplePboardType       @"MyCustomOutlineViewPboardType"
 
@@ -988,7 +982,6 @@ static NSString *        ChooseSourceIdentifier             = @"Choose Source It
 /*Opens the source browse window, called from Open Source widgets */
 - (IBAction) browseSources: (id) sender
 {
-    [self enableUI: NO];
     NSOpenPanel * panel;
        
     panel = [NSOpenPanel openPanel];
@@ -1138,14 +1131,6 @@ static NSString *        ChooseSourceIdentifier             = @"Choose Source It
         }
 
     }
-    else // User clicked Cancel in browse window
-    {
-        /* if we have a title loaded up */
-        if ([[fSrcDVD2Field stringValue] length] > 0 && SuccessfulScan)
-        {
-            [self enableUI: YES];
-        }
-    }
 }
 
 /* Here we open the title selection sheet where we can specify an exact title to be scanned */
@@ -1191,6 +1176,8 @@ static NSString *        ChooseSourceIdentifier             = @"Choose Source It
     [fChapterTitlesDelegate resetWithTitle:nil];
     [fChapterTable reloadData];
 
+    [self enableUI: NO];
+
     if( [detector isVideoDVD] )
     {
         // The chosen path was actually on a DVD, so use the raw block
@@ -1253,14 +1240,6 @@ static NSString *        ChooseSourceIdentifier             = @"Choose Source It
         hb_scan( fHandle, [path UTF8String], scanTitleNum );
         [fSrcDVD2Field setStringValue:@"Scanning new source ..."];
     }
-    else
-    {
-            /* if we have a title loaded up */
-        if ([[fSrcDVD2Field stringValue] length] > 0 && SuccessfulScan)
-        {
-            [self enableUI: YES];
-        }
-    }
 }
 
 - (IBAction) showNewScan:(id)sender