diff options
author | ritsuka <damiog@gmail.com> | 2015-04-07 16:14:30 +0000 |
---|---|---|
committer | ritsuka <damiog@gmail.com> | 2015-04-07 16:14:30 +0000 |
commit | 13d0d1d579a7e56ac2e2978994e3f0e74d324bba (patch) | |
tree | 557b0bc93f0d4c42028ae5c3a6cd80989b52fbfa /macosx/HBController.m | |
parent | 3f537cb97206f609c62867b32f262dd716b8df31 (diff) |
MacGui: changed the Preview Window and Picture Panel behaviour to avoid the hide and show thing when loading a new title, now they can always be opened even if no title is loaded.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7065 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBController.m')
-rw-r--r-- | macosx/HBController.m | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/macosx/HBController.m b/macosx/HBController.m index 29b69da18..9379abf43 100644 --- a/macosx/HBController.m +++ b/macosx/HBController.m @@ -29,7 +29,7 @@ #import "HBCore.h" #import "HBJob.h" -@interface HBController () <HBPresetsViewControllerDelegate, HBPreviewControllerDelegate, HBPictureControllerDelegate, HBTitleSelectionDelegate> +@interface HBController () <HBPresetsViewControllerDelegate, HBTitleSelectionDelegate> @property (unsafe_unretained) IBOutlet NSView *openTitleView; @property (nonatomic, readwrite) BOOL scanSpecificTitle; @@ -73,10 +73,10 @@ _core.name = @"ScanCore"; // Inits the controllers + fPreviewController = [[HBPreviewController alloc] init]; fPictureController = [[HBPictureController alloc] init]; - [fPictureController setDelegate:self]; - - fPreviewController = [[HBPreviewController alloc] initWithDelegate:self]; + fPictureController.previewWindow = fPreviewController; + fPreviewController.pictureSettingsWindow = fPictureController; fQueueController = queueController; fQueueController.controller = self; @@ -346,9 +346,7 @@ } } - if (action == @selector(showPicturePanel:) || - action == @selector(showPreviewWindow:) || - action == @selector(addToQueue:)) + if (action == @selector(addToQueue:)) { return (self.job != nil); } @@ -360,9 +358,8 @@ { SEL action = [menuItem action]; - if (action == @selector(addToQueue:) || action == @selector(addAllTitlesToQueue:) || action == @selector(addTitlesToQueue:) || - action == @selector(showPicturePanel:) || action == @selector(showAddPresetPanel:) || - action == @selector(showPreviewWindow:)) + if (action == @selector(addToQueue:) || action == @selector(addAllTitlesToQueue:) || + action == @selector(addTitlesToQueue:) || action == @selector(showAddPresetPanel:)) { return self.job && self.window.attachedSheet == nil; } @@ -751,14 +748,6 @@ [self titlePopUpChanged:nil]; - // Open preview window now if it was visible when HB was closed - if ([[NSUserDefaults standardUserDefaults] boolForKey:@"PreviewWindowIsOpen"]) - [self showPreviewWindow:nil]; - - // Open picture sizing window now if it was visible when HB was closed - if ([[NSUserDefaults standardUserDefaults] boolForKey:@"PictureSizeWindowIsOpen"]) - [self showPicturePanel:nil]; - if (self.jobFromQueue) { [fPresetsView deselect]; @@ -1273,7 +1262,7 @@ */ - (IBAction)showPicturePanel:(id)sender { - [fPictureController showPictureWindow]; + [fPictureController showWindow:sender]; } - (IBAction)showPreviewWindow:(id)sender |