summaryrefslogtreecommitdiffstats
path: root/macosx/Controller.mm
diff options
context:
space:
mode:
authordynaflash <[email protected]>2009-01-12 00:07:38 +0000
committerdynaflash <[email protected]>2009-01-12 00:07:38 +0000
commit7e73b3884143ae1fb8c8cd9a384c1ef959fa0a86 (patch)
tree3921b193dd1dbf5aafbe206d525ad4d40bf702fb /macosx/Controller.mm
parentf2bd5d8c9da510bfc2969d0cf23a68196d61faa5 (diff)
MacGui: Separate Picture Settings and Preview Window Initial Implementation
- Picture Settings is now a hud style inspector panel: -- Allows more room to be displayed along with Main Window. -- Has button (though ugly ... for now) to open the preview window. - Separate Preview Window: -- Preview Window can now show the entire preview content via a hud style overlay controller (ala iTunes, DvdPlayer controls) activated by mouse movement. -- Has button to allow opening the Picture Settings inspector. -- Full Screen Mode (ala iTunes, DvdPlayer) which should help for max preview size for HD sources. - Note: all hud style controls in this implementation are created only using core animation filters, I decided against a third party hud control framework, though one can certainly be implemented at any time. - Known Issues: -- WARNING: Quitting HB while in full screen mode will crash the macgui. -- The hud overlay controls in the Preview Window will align kind of wonky when the resolution is scaled way below the source. -- Ideally, after moving the mouse within the preview area then stopping, after a certain amount of time the hud overlay control box should disappear. -- Hud style controls still need alot of development to fit within the HIG. -- Need a keboard shortcut for the Preview Window. -- As usual with initial implementations there are likely many more Bugs/Issues. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2076 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/Controller.mm')
-rw-r--r--macosx/Controller.mm42
1 files changed, 30 insertions, 12 deletions
diff --git a/macosx/Controller.mm b/macosx/Controller.mm
index d507bbcba..3ca252b3c 100644
--- a/macosx/Controller.mm
+++ b/macosx/Controller.mm
@@ -9,6 +9,7 @@
#import "HBPreferencesController.h"
#import "HBDVDDetector.h"
#import "HBPresets.h"
+#import "HBPreviewController.h"
#define DragDropSimplePboardType @"MyCustomOutlineViewPboardType"
@@ -61,6 +62,7 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It
}
outputPanel = [[HBOutputPanelController alloc] init];
fPictureController = [[PictureController alloc] init];
+ //fPreviewController = [[PreviewController alloc] init];
fQueueController = [[HBQueueController alloc] init];
fAdvancedOptions = [[HBAdvancedController alloc] init];
/* we init the HBPresets class which currently is only used
@@ -90,6 +92,10 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It
/* Init others controllers */
[fPictureController SetHandle: fHandle];
[fPictureController setHBController: self];
+ /* fPreviewController */
+ //[fPreviewController SetHandle: fHandle];
+ //[fPreviewController setHBController: self];
+
[fQueueController setHandle: fQueueEncodeLibhb];
[fQueueController setHBController: self];
@@ -198,7 +204,7 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It
- (NSApplicationTerminateReply) applicationShouldTerminate: (NSApplication *) app
{
-
+ [fPreviewController goWindowedScreen:nil];
// Warn if encoding a movie
hb_state_t s;
hb_get_state( fQueueEncodeLibhb, &s );
@@ -241,6 +247,8 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It
[outputPanel release];
[fQueueController release];
[fPictureController release];
+
+ [fPreviewController release];
hb_close(&fHandle);
hb_close(&fQueueEncodeLibhb);
}
@@ -3599,9 +3607,9 @@ fWorkingCount = 0;
AutoCropLeft = job->crop[2];
AutoCropRight = job->crop[3];
- /* Reset the new title in fPictureController */
+ /* Reset the new title in fPictureController && fPreviewController*/
[fPictureController SetTitle:title];
-
+ //[fPreviewController SetTitle:title];
/* Update subtitle popups */
hb_subtitle_t * subtitle;
[fSubPopUp removeAllItems];
@@ -5161,13 +5169,22 @@ the user is using "Custom" settings by determining the sender*/
- (IBAction) showPicturePanel: (id) sender
{
- /*
- hb_list_t * list = hb_get_titles( fHandle );
- hb_title_t * title = (hb_title_t *) hb_list_item( list,
- [fSrcTitlePopUp indexOfSelectedItem] );
- */
- //[fPictureController showPreviewPanel:sender forTitle:title];
- [fPictureController showPictureWindow:sender];
+ [fPictureController showPictureWindow:sender];
+}
+
+- (void) picturePanelFullScreen
+{
+ [fPictureController setToFullScreenMode];
+}
+
+- (void) picturePanelWindowed
+{
+ [fPictureController setToWindowedMode];
+}
+
+- (IBAction) showPreviewWindow: (id) sender
+{
+ [fPictureController showPreviewWindow:sender];
}
#pragma mark -
@@ -5758,8 +5775,9 @@ return YES;
if (fTitle->width < [[chosenPreset objectForKey:@"PictureWidth"] intValue] || fTitle->height < [[chosenPreset objectForKey:@"PictureHeight"] intValue])
{
/* if so, then we use the sources height and width to avoid scaling up */
- job->width = fTitle->width;
- job->height = fTitle->height;
+ //job->width = fTitle->width;
+ //job->height = fTitle->height;
+ [self revertPictureSizeToMax:nil];
}
else // source width/height is >= the preset height/width
{