summaryrefslogtreecommitdiffstats
path: root/macosx/HBPreviewController.m
diff options
context:
space:
mode:
authordynaflash <[email protected]>2010-02-19 20:35:18 +0000
committerdynaflash <[email protected]>2010-02-19 20:35:18 +0000
commit42b5c877042e8882e27f34741013c4ff1f504d56 (patch)
treeca7910f8f61d3c8dabc104d25b0a5232912515c2 /macosx/HBPreviewController.m
parent2543a7aed801cbfdc43d85f4a5ddce37960387c3 (diff)
MacGui: Preview replace a method that was hastily removed in 3125 when removing Full Screen. Fixes broken window scaling.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3126 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBPreviewController.m')
-rw-r--r--macosx/HBPreviewController.m53
1 files changed, 52 insertions, 1 deletions
diff --git a/macosx/HBPreviewController.m b/macosx/HBPreviewController.m
index cc0e73826..71634fcfe 100644
--- a/macosx/HBPreviewController.m
+++ b/macosx/HBPreviewController.m
@@ -493,7 +493,58 @@
}
-
+- (IBAction)goWindowedScreen:(id)sender
+{
+
+ /* Get the screen info to release the display but don't actually do
+ * it until the windowed screen is setup.
+ */
+ scaleToScreen = NO;
+ [self pictureSliderChanged:nil];
+ [fScaleToScreenToggleButton setTitle:@"<->"];
+
+ NSScreen* mainScreen = [NSScreen mainScreen];
+ NSDictionary* screenInfo = [mainScreen deviceDescription];
+ NSNumber* screenID = [screenInfo objectForKey:@"NSScreenNumber"];
+ CGDirectDisplayID displayID = (CGDirectDisplayID)[screenID longValue];
+
+ [fFullScreenWindow dealloc];
+ [fFullScreenWindow release];
+
+
+ [fPreviewWindow setContentView:fPictureViewArea];
+ [fPictureViewArea setNeedsDisplay:YES];
+ [self setWindow:fPreviewWindow];
+
+ // Show the window.
+ [fPreviewWindow makeKeyAndOrderFront:self];
+
+ /* Set the window back to regular level */
+ [fPreviewWindow setLevel:NSNormalWindowLevel];
+
+ /* Set the isFullScreen flag back to NO */
+ //isFullScreen = NO;
+ scaleToScreen = NO;
+ /* make sure we are set to a still preview */
+ [self pictureSliderChanged:nil];
+ [self showPreviewWindow:nil];
+
+ /* Change the name of fFullScreenToggleButton appropriately */
+ //[fFullScreenToggleButton setTitle: @"Full Screen"];
+ // [fScaleToScreenToggleButton setHidden:YES];
+ /* set the picture settings pallete back to normal level */
+ [fHBController picturePanelWindowed];
+
+ /* Release the display now that the we are back in windowed mode */
+ CGDisplayRelease(displayID);
+
+ [fPreviewWindow setAcceptsMouseMovedEvents:YES];
+ //[fFullScreenWindow setAcceptsMouseMovedEvents:NO];
+
+ hudTimerSeconds = 0;
+ [self startHudTimer];
+
+}
#pragma mark Still Preview Image Processing