diff options
author | dynaflash <[email protected]> | 2009-01-27 17:47:35 +0000 |
---|---|---|
committer | dynaflash <[email protected]> | 2009-01-27 17:47:35 +0000 |
commit | 22ad6f6931e51738146c0e01b169d0c65bee312d (patch) | |
tree | 73b1ccccecb1fa25e04b442ad13be3d17ef41991 /macosx/HBPreviewController.mm | |
parent | 37d64db75be1ed276961e1adfa9dca39bb645b43 (diff) |
MacGui: remember window postion and open/close state of the Picture Filter and Picture sizing inspectors and restore them at the next launch.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2101 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBPreviewController.mm')
-rw-r--r-- | macosx/HBPreviewController.mm | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/macosx/HBPreviewController.mm b/macosx/HBPreviewController.mm index 8d78b945b..a74282c50 100644 --- a/macosx/HBPreviewController.mm +++ b/macosx/HBPreviewController.mm @@ -49,6 +49,8 @@ - (IBAction) showPreviewWindow: (id)sender { [self showWindow:sender]; + [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"PreviewWindowIsOpen"]; + /* lets set the preview window to accept mouse moved events */ [fPreviewWindow setAcceptsMouseMovedEvents:YES]; hudTimerSeconds = 0; @@ -64,6 +66,11 @@ - (void)awakeFromNib { [fPreviewWindow setDelegate:self]; + if( ![[self window] setFrameUsingName:@"Preview"] ) + [[self window] center]; + [self setWindowFrameAutosaveName:@"Preview"]; + [[self window] setExcludedFromWindowsMenu:YES]; + /* lets set the preview window to accept mouse moved events */ [fPreviewWindow setAcceptsMouseMovedEvents:YES]; //[self pictureSliderChanged:nil]; @@ -118,6 +125,7 @@ return YES; isFullScreen = NO; hudTimerSeconds = 0; + [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"PreviewWindowIsOpen"]; } - (BOOL)windowShouldClose:(id)fPictureWindow @@ -187,10 +195,10 @@ return YES; - (void) SetTitle: (hb_title_t *) title { hb_job_t * job = title->job; - + fTitle = title; -fPicture = 0; -MaxOutputWidth = title->width - job->crop[2] - job->crop[3]; + fPicture = 0; + MaxOutputWidth = title->width - job->crop[2] - job->crop[3]; MaxOutputHeight = title->height - job->crop[0] - job->crop[1]; [self SettingsChanged: nil]; } @@ -329,11 +337,13 @@ MaxOutputWidth = title->width - job->crop[2] - job->crop[3]; else { [self showWindow:sender]; + [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"PreviewWindowIsOpen"]; [fPreviewWindow setAcceptsMouseMovedEvents:YES]; isFullScreen = NO; scaleToScreen = NO; hudTimerSeconds = 0; [self startHudTimer]; + } } |