summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authordynaflash <[email protected]>2009-02-13 01:23:27 +0000
committerdynaflash <[email protected]>2009-02-13 01:23:27 +0000
commit79ca983a70cef58f76cfaa86ea859c3d800a1f13 (patch)
tree40827131c39afb0a446c87f47d4f6572abe070c2 /macosx
parent1eaad61b3dca9500b547f5dad29708e18e3da3dc (diff)
MacGui: Fix crash when trying to quit with preview in full screen mode.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2155 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx')
-rw-r--r--macosx/Controller.mm14
-rw-r--r--macosx/HBPreviewController.mm9
-rw-r--r--macosx/PictureController.h2
-rw-r--r--macosx/PictureController.mm10
4 files changed, 26 insertions, 9 deletions
diff --git a/macosx/Controller.mm b/macosx/Controller.mm
index 287b4944b..2e73266dc 100644
--- a/macosx/Controller.mm
+++ b/macosx/Controller.mm
@@ -208,9 +208,14 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It
- (NSApplicationTerminateReply) applicationShouldTerminate: (NSApplication *) app
{
- if ([fPreviewController fullScreen] == YES)
+ /* if we are in preview full screen mode, we need to go to
+ * windowed mode and release the display before we terminate.
+ * We do it here (instead of applicationWillTerminate) so we
+ * release the displays and can then see the alerts below.
+ */
+ if ([fPictureController previewFullScreenMode] == YES)
{
- [fPreviewController goWindowedScreen:nil];
+ [fPictureController previewGoWindowed:nil];
}
hb_state_t s;
@@ -250,13 +255,14 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It
- (void)applicationWillTerminate:(NSNotification *)aNotification
{
- [browsedSourceDisplayName release];
+
+ [browsedSourceDisplayName release];
[outputPanel release];
[fQueueController release];
+ [fPreviewController release];
[fPictureController release];
[fPictureFilterController release];
- [fPreviewController release];
hb_close(&fHandle);
hb_close(&fQueueEncodeLibhb);
}
diff --git a/macosx/HBPreviewController.mm b/macosx/HBPreviewController.mm
index 39106c9b9..ec7862b0c 100644
--- a/macosx/HBPreviewController.mm
+++ b/macosx/HBPreviewController.mm
@@ -108,6 +108,8 @@ return YES;
- (void)windowWillClose:(NSNotification *)aNotification
{
+
+
/* Upon Closing the picture window, we make sure we clean up any
* preview movie that might be playing
*/
@@ -118,10 +120,6 @@ return YES;
[fPictureView setHidden:NO];
[fMovieView pause:nil];
[fMovieView setHidden:YES];
- if (isFullScreen)
- {
- [self goWindowedScreen:nil];
- }
isFullScreen = NO;
hudTimerSeconds = 0;
@@ -130,7 +128,8 @@ return YES;
- (BOOL)windowShouldClose:(id)fPictureWindow
{
- return YES;
+
+ return YES;
}
- (void) dealloc
diff --git a/macosx/PictureController.h b/macosx/PictureController.h
index 01dd7eebb..756488155 100644
--- a/macosx/PictureController.h
+++ b/macosx/PictureController.h
@@ -73,6 +73,8 @@
- (void)setHBController: (HBController *)controller;
- (IBAction) showPictureWindow: (id)sender;
- (IBAction) showPreviewWindow: (id)sender;
+- (BOOL) previewFullScreenMode;
+- (IBAction) previewGoWindowed: (id)sender;
- (IBAction) showFilterWindow: (id)sender;
diff --git a/macosx/PictureController.mm b/macosx/PictureController.mm
index fa76a996a..30409d9e0 100644
--- a/macosx/PictureController.mm
+++ b/macosx/PictureController.mm
@@ -56,6 +56,16 @@
}
}
+- (BOOL) previewFullScreenMode
+{
+ return [fPreviewController fullScreen];
+}
+
+- (IBAction) previewGoWindowed: (id)sender
+{
+ [fPreviewController goWindowedScreen:self];
+}
+
- (IBAction) showPreviewWindow: (id)sender
{
[fPreviewController showWindow:sender];