summaryrefslogtreecommitdiffstats
path: root/macosx/HBEncodingProgressHUDController.m
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2016-05-03 18:47:14 +0200
committerDamiano Galassi <[email protected]>2016-05-03 18:47:14 +0200
commite53308f9342d911a9d3e8f4d1eeba6e53fabc0ab (patch)
treef65f5390d9174276022790a308660e17d7a3601f /macosx/HBEncodingProgressHUDController.m
parent4ab21a0ca630dc4bac79149a6eec598921899fe5 (diff)
MacGui: use AVFoundation as the first option for the preview playback. Add volume and tracks controls to the player hud.
Diffstat (limited to 'macosx/HBEncodingProgressHUDController.m')
-rw-r--r--macosx/HBEncodingProgressHUDController.m63
1 files changed, 63 insertions, 0 deletions
diff --git a/macosx/HBEncodingProgressHUDController.m b/macosx/HBEncodingProgressHUDController.m
new file mode 100644
index 000000000..4ac16e1ea
--- /dev/null
+++ b/macosx/HBEncodingProgressHUDController.m
@@ -0,0 +1,63 @@
+/* HBEncodingProgressHUDController.m $
+
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr/>.
+ It may be used under the terms of the GNU General Public License. */
+
+#import "HBEncodingProgressHUDController.h"
+
+@interface HBEncodingProgressHUDController ()
+
+@property (weak) IBOutlet NSProgressIndicator *progressIndicator;
+@property (weak) IBOutlet NSTextField *infoLabel;
+
+@end
+
+@implementation HBEncodingProgressHUDController
+
+- (NSString *)nibName
+{
+ return @"HBEncodingProgressHUDController";
+}
+
+- (void)loadView
+{
+ [super loadView];
+
+ if (NSClassFromString(@"NSVisualEffectView") == NO)
+ {
+ self.infoLabel.textColor = [NSColor whiteColor];
+ }
+}
+
+- (BOOL)canBeHidden
+{
+ return NO;
+}
+
+- (void)setInfo:(NSString *)info
+{
+ self.infoLabel.stringValue = info;
+}
+
+- (void)setProgress:(double)progress
+{
+ self.progressIndicator.doubleValue = progress;
+}
+
+- (IBAction)cancelEncoding:(id)sender
+{
+ [self.delegate cancelEncoding];
+}
+
+- (BOOL)HB_keyDown:(NSEvent *)event
+{
+ return NO;
+}
+
+- (BOOL)HB_scrollWheel:(NSEvent *)theEvent
+{
+ return NO;
+}
+
+@end