summaryrefslogtreecommitdiffstats
path: root/macosx/HBController.m
diff options
context:
space:
mode:
authorritsuka <[email protected]>2015-07-24 10:08:20 +0000
committerritsuka <[email protected]>2015-07-24 10:08:20 +0000
commit5fde0dc88488deb0a0c0708cedb7e945c8f2df8c (patch)
treee2946a54862513f906a2de932024fb0f0a4a9acf /macosx/HBController.m
parent9a164b3472fedcabe9a9699477f93864c2bb4ec7 (diff)
MacGUI: don' try to rescan a job from queue if there is already a scan going on.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7372 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBController.m')
-rw-r--r--macosx/HBController.m37
1 files changed, 23 insertions, 14 deletions
diff --git a/macosx/HBController.m b/macosx/HBController.m
index 1259cc652..9af2cfdfc 100644
--- a/macosx/HBController.m
+++ b/macosx/HBController.m
@@ -204,7 +204,7 @@
if ([pboard.types containsObject:NSFilenamesPboardType])
{
NSArray *paths = [pboard propertyListForType:NSFilenamesPboardType];
- [self openFile:[NSURL fileURLWithPath:paths.firstObject]];
+ [self openURL:[NSURL fileURLWithPath:paths.firstObject]];
}
return YES;
@@ -430,13 +430,34 @@
}
-- (void)openFile:(NSURL *)fileURL
+- (BOOL)openURL:(NSURL *)fileURL
{
if (self.core.state != HBStateScanning)
{
self.browsedSourceDisplayName = fileURL.lastPathComponent;
[self performScan:fileURL scanTitleNum:0];
+
+ return YES;
}
+ return NO;
+}
+
+/**
+ * Rescans the a job back into the main window
+ */
+- (BOOL)openJob:(HBJob *)job
+{
+ if (self.core.state != HBStateScanning)
+ {
+ self.jobFromQueue = job;
+
+ // Set the browsedSourceDisplayName for showNewScan
+ self.browsedSourceDisplayName = self.jobFromQueue.fileURL.lastPathComponent;
+
+ [self performScan:self.jobFromQueue.fileURL scanTitleNum:self.jobFromQueue.titleIdx];
+ return YES;
+ }
+ return NO;
}
- (void)removeJobObservers
@@ -1051,18 +1072,6 @@
}
}
-/**
- * Rescans the chosen queue item back into the main window
- */
-- (void)openJob:(HBJob *)job
-{
- // Set the browsedSourceDisplayName for showNewScan
- self.jobFromQueue = job;
- self.browsedSourceDisplayName = self.jobFromQueue.fileURL.lastPathComponent;
-
- [self performScan:self.jobFromQueue.fileURL scanTitleNum:self.jobFromQueue.titleIdx];
-}
-
- (void)doRip
{
// if there are no jobs in the queue, then add this one to the queue and rip