summaryrefslogtreecommitdiffstats
path: root/macosx/HBPreviewController.m
diff options
context:
space:
mode:
authorritsuka <[email protected]>2015-07-27 08:51:30 +0000
committerritsuka <[email protected]>2015-07-27 08:51:30 +0000
commitaa4f592e9a991144e1ecac601858eefbf12a853c (patch)
treecb599cf44204baccde988182beae546f86e22e52 /macosx/HBPreviewController.m
parent0f53167a48fdb049021d0ea9128970c2a4e27e32 (diff)
MacGui: move the picture and filters settings to the main window.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7379 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBPreviewController.m')
-rw-r--r--macosx/HBPreviewController.m24
1 files changed, 23 insertions, 1 deletions
diff --git a/macosx/HBPreviewController.m b/macosx/HBPreviewController.m
index ef42b961e..5c33f5865 100644
--- a/macosx/HBPreviewController.m
+++ b/macosx/HBPreviewController.m
@@ -6,6 +6,8 @@
#import "HBPreviewController.h"
#import "HBPreviewGenerator.h"
+#import "HBPictureController.h"
+
#import <QTKit/QTKit.h>
@implementation QTMovieView (HBQTMovieViewExtensions)
@@ -21,7 +23,7 @@
- (BOOL) isPlaying
{
- if ([self rate])
+ if ([self rate] > 0)
return YES;
else
return NO;
@@ -93,6 +95,8 @@ typedef enum ViewMode : NSUInteger {
IBOutlet NSPopUpButton * fPreviewMovieLengthPopUp;
}
+@property (nonatomic, readwrite) HBPictureController *pictureSettingsWindow;
+
@property (nonatomic, strong) CALayer *backLayer;
@property (nonatomic, strong) CALayer *pictureLayer;
@@ -278,6 +282,7 @@ typedef enum ViewMode : NSUInteger {
[self stopMovieTimer];
}
+ [self.pictureSettingsWindow close];
[self.generator purgeImageCache];
}
@@ -799,6 +804,12 @@ typedef enum ViewMode : NSUInteger {
- (IBAction) showPictureSettings: (id) sender
{
+ if (self.pictureSettingsWindow == nil)
+ {
+ self.pictureSettingsWindow = [[HBPictureController alloc] init];
+ }
+
+ self.pictureSettingsWindow.picture = self.picture;
[self.pictureSettingsWindow showWindow:self];
}
@@ -835,6 +846,17 @@ typedef enum ViewMode : NSUInteger {
if (!movie)
{
+ NSAlert *alert = [NSAlert alertWithMessageText:NSLocalizedString(@"HandBrake can't open the preview.", nil)
+ defaultButton:NSLocalizedString(@"Open in external player", nil)
+ alternateButton:NSLocalizedString(@"Cancel", nil)
+ otherButton:nil
+ informativeTextWithFormat:NSLocalizedString(@"HandBrake can't playback this combination of video/audio/container format. Do you want to open it in an external player?", nil)];
+ [alert beginSheetModalForWindow:self.window completionHandler:^(NSModalResponse returnCode) {
+ if (returnCode == NSModalResponseOK)
+ {
+ [[NSWorkspace sharedWorkspace] openURL:fileURL];
+ }
+ }];
[self switchViewToMode:ViewModePicturePreview];
}
else