diff options
Diffstat (limited to 'macosx/HBPreviewController.m')
-rw-r--r-- | macosx/HBPreviewController.m | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/macosx/HBPreviewController.m b/macosx/HBPreviewController.m index d9c7b055d..974173d52 100644 --- a/macosx/HBPreviewController.m +++ b/macosx/HBPreviewController.m @@ -10,6 +10,8 @@ #import "HBPreviewView.h" +#import "HBController.h" + #import <QTKit/QTKit.h> #import "QTKit+HBQTMovieExtensions.h" @@ -141,6 +143,33 @@ typedef enum ViewMode : NSUInteger { [_generator cancel]; } +- (BOOL)validateMenuItem:(NSMenuItem *)menuItem +{ + SEL action = menuItem.action; + + if (action == @selector(selectPresetFromMenu:)) + { + return [self.documentController validateMenuItem:menuItem]; + } + + return YES; +} + +- (IBAction)selectDefaultPreset:(id)sender +{ + [self.documentController selectDefaultPreset:sender]; +} + +- (NSUndoManager *)windowWillReturnUndoManager:(NSWindow *)window +{ + return self.documentController.window.undoManager; +} + +- (IBAction)selectPresetFromMenu:(id)sender +{ + [self.documentController selectPresetFromMenu:sender]; +} + - (void)setPicture:(HBPicture *)picture { _picture = picture; @@ -641,6 +670,7 @@ typedef enum ViewMode : NSUInteger { if (self.pictureSettingsWindow == nil) { self.pictureSettingsWindow = [[HBPictureController alloc] init]; + self.pictureSettingsWindow.previewController = self; } self.pictureSettingsWindow.picture = self.picture; |