summaryrefslogtreecommitdiffstats
path: root/macosx/Controller.mm
diff options
context:
space:
mode:
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