]> granicus.if.org Git - handbrake/commitdiff
MacGui: more missing files.
authorritsuka <damiog@gmail.com>
Fri, 24 Jul 2015 10:10:40 +0000 (10:10 +0000)
committerritsuka <damiog@gmail.com>
Fri, 24 Jul 2015 10:10:40 +0000 (10:10 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7374 b64f7644-9d1e-0410-96f1-a4d463321fa5

macosx/HBAppDelegate.m
macosx/HBQueueController.m

index 33b82c315fcf6ad8a41ada2d66535b4187d2f3d7..fddd8a48d982c850fa2ae54c4779f7ab01c92bdf 100644 (file)
 
 - (void)application:(NSApplication *)sender openFiles:(NSArray *)filenames
 {
-    [self.mainController openFile:[NSURL fileURLWithPath:filenames.firstObject]];
+    [self.mainController openURL:[NSURL fileURLWithPath:filenames.firstObject]];
     [NSApp replyToOpenOrPrint:NSApplicationDelegateReplySuccess];
 }
 
index c366ce14e4506f6e014a367c556a5c257be00949..b54143ff22df4630b83e22688e35954ae9c59913 100644 (file)
         {
             // since we are not a currently encoding item, we can just be edit it
             HBJob *item = [[self.jobs[row] representedObject] copy];
-            [self.controller openJob:item];
-
-            // Now that source is loaded and settings applied, delete the queue item from the queue
-            [self.outlineView beginUpdates];
-            [self removeQueueItemAtIndex:row];
-            [self.outlineView removeItemsAtIndexes:[NSIndexSet indexSetWithIndex:row] inParent:nil withAnimation:NSTableViewAnimationEffectFade];
-            [self.outlineView endUpdates];
+            if ([self.controller openJob:item])
+            {
+                // Now that source is loaded and settings applied, delete the queue item from the queue
+                [self.outlineView beginUpdates];
+                [self removeQueueItemAtIndex:row];
+                [self.outlineView removeItemsAtIndexes:[NSIndexSet indexSetWithIndex:row] inParent:nil withAnimation:NSTableViewAnimationEffectFade];
+                [self.outlineView endUpdates];
 
-            [self getQueueStats];
+                [self getQueueStats];
+            }
         }
     }
 
             [self cancelCurrentJobAndContinue];
         }
 
-        [self.jobs beginTransaction];
-        [self.controller openJob:job];
-        [self removeQueueItemAtIndex:index];
-        [self.jobs commit];
+        if ([self.controller openJob:job])
+        {
+            [self.jobs beginTransaction];
+            [self.controller openJob:job];
+            [self removeQueueItemAtIndex:index];
+            [self.jobs commit];
+            [self getQueueStats];
+        }
     }
 }