summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcleaner <[email protected]>2007-06-06 20:05:55 +0000
committercleaner <[email protected]>2007-06-06 20:05:55 +0000
commitbdfe89478bf6ca815fa6a1377224108bb257783c (patch)
treefd81d685d5bb3ca3c93a7fe105dd4aba122e2d71
parent4f6c1e4bce148d2630e099a3d65c64d1ffe95a55 (diff)
Debug output window is now opened automatically if it was visible when HB was closed.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@603 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--macosx/Controller.mm4
-rw-r--r--macosx/HBOutputPanelController.m8
2 files changed, 12 insertions, 0 deletions
diff --git a/macosx/Controller.mm b/macosx/Controller.mm
index 9584f169a..cdd0d3008 100644
--- a/macosx/Controller.mm
+++ b/macosx/Controller.mm
@@ -44,6 +44,10 @@ static int FormatSettings[3][4] =
int build;
char * version;
+ // Open debug output window now if it was visible when HB was closed
+ if ([[NSUserDefaults standardUserDefaults] boolForKey:@"OutputPanelIsOpen"])
+ [self showDebugOutputPanel:nil];
+
// Init libhb
int debugLevel = [[NSUserDefaults standardUserDefaults] boolForKey:@"ShowVerboseOutput"] ? HB_DEBUG_ALL : HB_DEBUG_NONE;
fHandle = hb_init(debugLevel, [[NSUserDefaults standardUserDefaults] boolForKey:@"CheckForUpdates"]);
diff --git a/macosx/HBOutputPanelController.m b/macosx/HBOutputPanelController.m
index 87a5d3876..54bf4916e 100644
--- a/macosx/HBOutputPanelController.m
+++ b/macosx/HBOutputPanelController.m
@@ -59,6 +59,8 @@
[textView scrollRangeToVisible:NSMakeRange([outputTextStorage length], 0)];
[outputPanel orderFront:nil];
+
+ [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"OutputPanelIsOpen"];
}
/**
@@ -95,4 +97,10 @@
[pboard setString:[outputTextStorage string] forType:NSStringPboardType];
}
+- (void)windowWillClose:(NSNotification *)aNotification
+{
+ [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"OutputPanelIsOpen"];
+}
+
+
@end