summaryrefslogtreecommitdiffstats
path: root/macosx/Controller.mm
diff options
context:
space:
mode:
authordynaflash <[email protected]>2007-05-21 16:50:21 +0000
committerdynaflash <[email protected]>2007-05-21 16:50:21 +0000
commit7f232a9f43d6cdb3094485a5ac73ff9033c1880a (patch)
tree6d3ca68609c344c648dfdc833d3b27700e755795 /macosx/Controller.mm
parentd7154d2184454ca5cd115830ed15dd8d1dbfe426 (diff)
MacGui: Debug Window to read libhb output like cli in inspector window
- Thank You Cleaner!! - Adds Debug Output to Window menu - Adds Verbose pref to preferences menu - MacGui now reads output from libhb like cli - May add pref to open Debug Output window upon launch - All credit goes to Cleaner, Thank You! git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@592 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/Controller.mm')
-rw-r--r--macosx/Controller.mm29
1 files changed, 19 insertions, 10 deletions
diff --git a/macosx/Controller.mm b/macosx/Controller.mm
index e4d9cbb38..952514a46 100644
--- a/macosx/Controller.mm
+++ b/macosx/Controller.mm
@@ -6,6 +6,7 @@
#include "Controller.h"
#include "a52dec/a52.h"
+#import "HBOutputPanelController.h"
#define _(a) NSLocalizedString(a,NULL)
@@ -36,21 +37,20 @@ static int FormatSettings[3][4] =
{
self = [super init];
fHandle = NULL;
+ outputPanel = [[HBOutputPanelController alloc] init];
return self;
}
- (void) applicationDidFinishLaunching: (NSNotification *) notification
{
-
-
int build;
char * version;
+ // Init libhb
+ int debugLevel = [[NSUserDefaults standardUserDefaults] boolForKey:@"ShowVerboseOutput"] ? HB_DEBUG_ALL : HB_DEBUG_NONE;
+ fHandle = hb_init(debugLevel, [[NSUserDefaults standardUserDefaults] boolForKey:@"CheckForUpdates"]);
- /* Init libhb */
- fHandle = hb_init( HB_DEBUG_NONE, [[NSUserDefaults
- standardUserDefaults] boolForKey:@"CheckForUpdates"] );
- /* Set the Growl Delegate */
+ // Set the Growl Delegate
HBController *hbGrowlDelegate = [[HBController alloc] init];
[GrowlApplicationBridge setGrowlDelegate: hbGrowlDelegate];
/* Init others controllers */
@@ -93,13 +93,17 @@ static int FormatSettings[3][4] =
{
[self Cancel: NULL];
return NSTerminateCancel;
- }
-
- /* Clean up */
- hb_close( &fHandle );
+ }
return NSTerminateNow;
}
+- (void)applicationWillTerminate:(NSNotification *)aNotification
+{
+ [outputPanel release];
+ hb_close(&fHandle);
+}
+
+
- (void) awakeFromNib
{
[fWindow center];
@@ -3347,5 +3351,10 @@ id theRecord, theValue;
URLWithString:@"http://handbrake.m0k.org/trac/wiki/HandBrakeGuide"]];
}
+- (IBAction)showDebugOutputPanel:(id)sender
+{
+ [outputPanel showOutputPanel:nil];
+}
+
@end