summaryrefslogtreecommitdiffstats
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
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
-rw-r--r--macosx/HBPreviewController.h2
-rw-r--r--macosx/HBPreviewController.m53
-rw-r--r--macosx/PictureController.h1
-rw-r--r--macosx/PictureController.m5
4 files changed, 54 insertions, 7 deletions
diff --git a/macosx/HBPreviewController.h b/macosx/HBPreviewController.h
index 38c86c99d..cbfd04c9c 100644
--- a/macosx/HBPreviewController.h
+++ b/macosx/HBPreviewController.h
@@ -79,7 +79,7 @@
- (NSString*) pictureSizeInfoString;
- (IBAction)toggleScaleToScreen:(id)sender;
-
+- (IBAction)goWindowedScreen:(id)sender;
/* HUD overlay */
- (void) startHudTimer;
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
diff --git a/macosx/PictureController.h b/macosx/PictureController.h
index fc8172f06..96ea118ae 100644
--- a/macosx/PictureController.h
+++ b/macosx/PictureController.h
@@ -170,7 +170,6 @@
- (IBAction) resizeInspectorForTab: (id)sender;
- (IBAction) showPreviewWindow: (id)sender;
-- (IBAction) previewGoWindowed: (id)sender;
- (IBAction) adjustSizingDisplay: (id) sender;
diff --git a/macosx/PictureController.m b/macosx/PictureController.m
index 5f916d8be..4cc39331f 100644
--- a/macosx/PictureController.m
+++ b/macosx/PictureController.m
@@ -387,10 +387,7 @@
#pragma mark -
-- (IBAction) previewGoWindowed: (id)sender
-{
- [fPreviewController goWindowedScreen:self];
-}
+
- (IBAction) showPreviewWindow: (id)sender
{