From bdfe89478bf6ca815fa6a1377224108bb257783c Mon Sep 17 00:00:00 2001 From: cleaner Date: Wed, 6 Jun 2007 20:05:55 +0000 Subject: 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 --- macosx/Controller.mm | 4 ++++ macosx/HBOutputPanelController.m | 8 ++++++++ 2 files changed, 12 insertions(+) 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 -- cgit v1.2.3