diff options
author | ritsuka <[email protected]> | 2007-09-10 13:23:30 +0000 |
---|---|---|
committer | ritsuka <[email protected]> | 2007-09-10 13:23:30 +0000 |
commit | ee9802a07ae486348ad7c1d5c6f5e27ff0b063ad (patch) | |
tree | ee9b66dde9c29b0190796a9e1fd3f6e1799a9997 /macosx/Controller.mm | |
parent | 1431511b085cf5389d67bebec9149e12ca24ba75 (diff) |
MacGui: New preferences window. We need some new icons for the toolbar.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@942 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/Controller.mm')
-rw-r--r-- | macosx/Controller.mm | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/macosx/Controller.mm b/macosx/Controller.mm index 856ab2125..b2fb41fe6 100644 --- a/macosx/Controller.mm +++ b/macosx/Controller.mm @@ -83,6 +83,7 @@ static int hb_group_count(hb_handle_t * h) fPictureController = [[PictureController alloc] initWithDelegate:self]; fQueueController = [[HBQueueController alloc] init]; fAdvancedOptions = [[HBAdvancedController alloc] init]; + fPreferencesController = [[HBPreferencesController alloc] init]; return self; } @@ -1286,7 +1287,7 @@ static int hb_group_count(hb_handle_t * h) } [self qualitySliderChanged: sender]; - [self calculateBitrate: sender]; + [self calculateBitrate: sender]; [self customSettingUsed: sender]; } @@ -1767,7 +1768,7 @@ static int hb_group_count(hb_handle_t * h) { hb_list_t * list = hb_get_titles( fHandle ); hb_title_t * title = (hb_title_t*) - hb_list_item( list, [fSrcTitlePopUp indexOfSelectedItem] ); + hb_list_item( list, [fSrcTitlePopUp indexOfSelectedItem] ); /* If Auto Naming is on. We create an output filename of dvd name - title number */ @@ -2003,8 +2004,7 @@ static int hb_group_count(hb_handle_t * h) _( @"AVC/H.264 Video / MP3 Audio" )]; [fDstCodecsPopUp addItemWithTitle: _( @"AVC/H.264 Video / Vorbis Audio" )]; - /* We disable the create chapters checkbox here since we are NOT .mp4 - and make sure it is unchecked*/ + /* We enable the create chapters checkbox here since */ [fCreateChapterMarkers setEnabled: YES]; break; } @@ -2665,8 +2665,6 @@ static int hb_group_count(hb_handle_t * h) [fVidBitrateField setIntValue: hb_calc_bitrate( job, [fVidTargetSizeField intValue] )]; - - [self customSettingUsed:sender]; } /* Method to determine if we should change the UI @@ -4436,16 +4434,6 @@ id theRecord, theValue; } -- (void) controlTextDidBeginEditing: (NSNotification *) notification -{ - [self calculateBitrate: NULL]; -} - -- (void) controlTextDidEndEditing: (NSNotification *) notification -{ - [self calculateBitrate: NULL]; -} - - (void) controlTextDidChange: (NSNotification *) notification { [self calculateBitrate: NULL]; @@ -4477,14 +4465,15 @@ id theRecord, theValue; } /** - * Creates preferences controller, shows preferences window modally, and - * releases the controller after user has closed the window. + * Shows preferences window modally. */ -- (IBAction)showPreferencesWindow:(id)sender +- (IBAction) showPreferencesWindow: (id) sender { - HBPreferencesController *controller = [[HBPreferencesController alloc] init]; - [controller runModal:nil]; - [controller release]; + NSWindow * window = [fPreferencesController window]; + if (![window isVisible]) + [window center]; + + [window makeKeyAndOrderFront: nil]; } /** |