diff options
author | ritsuka <[email protected]> | 2014-08-11 15:39:58 +0000 |
---|---|---|
committer | ritsuka <[email protected]> | 2014-08-11 15:39:58 +0000 |
commit | 76c8ebacb6b8ad5787864d85521b89d9a9a3f1b8 (patch) | |
tree | 438033f24732a94329829bfaba6563ef6ea637e0 /macosx | |
parent | 8bfcc38a3272405bb148da929393405c16cf3db8 (diff) |
MacGui: fixed the validation of the File menu. The validateMenuItem: method was using the wrong hb_handle_t .
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6288 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/Controller.m | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/macosx/Controller.m b/macosx/Controller.m index 3ba09b792..2d15f0a15 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -1420,22 +1420,15 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It - (BOOL) validateMenuItem: (NSMenuItem *) menuItem { SEL action = [menuItem action]; - + hb_state_t s; - hb_get_state2( fHandle, &s ); - - if (fHandle) + hb_get_state2( fQueueEncodeLibhb, &s ); + + if (fQueueEncodeLibhb) { if (action == @selector(addToQueue:) || action == @selector(addAllTitlesToQueue:) || action == @selector(showPicturePanel:) || action == @selector(showAddPresetPanel:)) return SuccessfulScan && [fWindow attachedSheet] == nil; - if (action == @selector(browseSources:)) - { - if (s.state == HB_STATE_SCANNING) - return NO; - else - return [fWindow attachedSheet] == nil; - } if (action == @selector(selectDefaultPreset:)) return [fWindow attachedSheet] == nil; if (action == @selector(Pause:)) @@ -1472,6 +1465,15 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It else return NO; } + if (action == @selector(browseSources:)) + { + hb_get_state2( fHandle, &s ); + + if (s.state == HB_STATE_SCANNING) + return NO; + else + return [fWindow attachedSheet] == nil; + } } return YES; |