summaryrefslogtreecommitdiffstats
path: root/macosx/HBCore.m
diff options
context:
space:
mode:
authorritsuka <[email protected]>2015-01-27 11:31:50 +0000
committerritsuka <[email protected]>2015-01-27 11:31:50 +0000
commit6823cb8cc2734ca388a9fcdec1e0e347fc4f32d0 (patch)
tree31bbb6ecb43536fee892119ac73a3eaec8aa6ab2 /macosx/HBCore.m
parente8550395291bf598efd72615301667cc464e4532 (diff)
MacGui: disable the cancel button while the queue is scanning because there isn't a way to pause the scan. Use hb_state param.workdone.error to signal the result of an encode operation.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6818 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBCore.m')
-rw-r--r--macosx/HBCore.m15
1 files changed, 4 insertions, 11 deletions
diff --git a/macosx/HBCore.m b/macosx/HBCore.m
index 8446a6a33..dbbbb790e 100644
--- a/macosx/HBCore.m
+++ b/macosx/HBCore.m
@@ -246,7 +246,6 @@ static void hb_error_handler(const char *errmsg)
{
if (self.isCancelled)
{
- self.cancelled = NO;
return NO;
}
@@ -385,15 +384,7 @@ static void hb_error_handler(const char *errmsg)
[HBUtilities writeToActivityLog:"%s work done", self.name.UTF8String];
- if (self.isCancelled)
- {
- self.cancelled = NO;
- return NO;
- }
- else
- {
- return YES;
- }
+ return self.isCancelled || (_hb_state->param.workdone.error == 0);
}
- (void)cancelEncode
@@ -403,7 +394,6 @@ static void hb_error_handler(const char *errmsg)
[HBUtilities writeToActivityLog:"%s encode cancelled", self.name.UTF8String];
}
-
- (void)pause
{
hb_pause(_hb_handle);
@@ -519,6 +509,9 @@ static void hb_error_handler(const char *errmsg)
{
[self handleScanCompletion];
}
+
+ // Reset the cancelled state.
+ self.cancelled = NO;
}
/**