summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordynaflash <[email protected]>2007-06-19 17:44:09 +0000
committerdynaflash <[email protected]>2007-06-19 17:44:09 +0000
commit4959371e286039a773996cea289198c95b8ed8eb (patch)
treea4cd6dbbc17cbd1584867b936b75957da4e8f362
parent7394995e1ee8ed1f9c8deb6c82a686757a532cd4 (diff)
MacGui: Close Main Window issue fixed.
- Can now close the main HB window while HB is running and then re-open it with the "Main Window" selection in the "Window" toolbar menu without disturbing the current encode. - Note: should probably add "Main Window" to the Dock Icon Context menu as well. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@626 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--macosx/Controller.h2
-rw-r--r--macosx/Controller.mm26
-rw-r--r--macosx/English.lproj/MainMenu.nib/classes.nib1
-rw-r--r--macosx/English.lproj/MainMenu.nib/info.nib1
-rw-r--r--macosx/English.lproj/MainMenu.nib/keyedobjects.nibbin122180 -> 122381 bytes
5 files changed, 25 insertions, 5 deletions
diff --git a/macosx/Controller.h b/macosx/Controller.h
index 8fd68ac42..ee3b8b6de 100644
--- a/macosx/Controller.h
+++ b/macosx/Controller.h
@@ -234,7 +234,7 @@
- (IBAction) ShowPicturePanel: (id) sender;
- (IBAction) CalculatePictureSizing: (id) sender;
-
+- (IBAction) OpenMainWindow: (id) sender;
- (IBAction) AddToQueue: (id) sender;
- (IBAction) ShowQueuePanel: (id) sender;
diff --git a/macosx/Controller.mm b/macosx/Controller.mm
index e07f925d0..954a84e2b 100644
--- a/macosx/Controller.mm
+++ b/macosx/Controller.mm
@@ -719,11 +719,31 @@ return registrationDictionary;
[fScanController Show];
}
+- (IBAction) OpenMainWindow: (id) sender
+{
+[fWindow makeKeyAndOrderFront:nil];
+[fWindow setReleasedWhenClosed: YES];
+}
- (BOOL) windowShouldClose: (id) sender
{
- /* Stop the application when the user closes the window */
- [NSApp terminate: self];
- return YES;
+
+ /* See if we are currently running */
+ hb_state_t s;
+ hb_get_state( fHandle, &s );
+ if ( s.state == HB_STATE_WORKING)
+ {
+ /* If we are running, leave in memory when closing main window */
+ [fWindow setReleasedWhenClosed: NO];
+ return YES;
+
+ }
+ else
+ {
+ /* Stop the application when the user closes the window */
+ [NSApp terminate: self];
+ return YES;
+ }
+
}
- (IBAction) VideoMatrixChanged: (id) sender;
diff --git a/macosx/English.lproj/MainMenu.nib/classes.nib b/macosx/English.lproj/MainMenu.nib/classes.nib
index 72d4dc396..ecc18c019 100644
--- a/macosx/English.lproj/MainMenu.nib/classes.nib
+++ b/macosx/English.lproj/MainMenu.nib/classes.nib
@@ -23,6 +23,7 @@
InsertPreset = id;
OpenForums = id;
OpenHomepage = id;
+ OpenMainWindow = id;
OpenUserGuide = id;
Pause = id;
QualitySliderChanged = id;
diff --git a/macosx/English.lproj/MainMenu.nib/info.nib b/macosx/English.lproj/MainMenu.nib/info.nib
index 0973bee18..b1714dc72 100644
--- a/macosx/English.lproj/MainMenu.nib/info.nib
+++ b/macosx/English.lproj/MainMenu.nib/info.nib
@@ -20,7 +20,6 @@
<key>IBOpenObjects</key>
<array>
<integer>1162</integer>
- <integer>21</integer>
<integer>29</integer>
</array>
<key>IBSystem Version</key>
diff --git a/macosx/English.lproj/MainMenu.nib/keyedobjects.nib b/macosx/English.lproj/MainMenu.nib/keyedobjects.nib
index 9dcc7ae58..cc8e15e18 100644
--- a/macosx/English.lproj/MainMenu.nib/keyedobjects.nib
+++ b/macosx/English.lproj/MainMenu.nib/keyedobjects.nib
Binary files differ