diff options
author | ritsuka <[email protected]> | 2007-09-09 14:17:03 +0000 |
---|---|---|
committer | ritsuka <[email protected]> | 2007-09-09 14:17:03 +0000 |
commit | a2a0fb470bf50e75937c68b02f0e97a9f6cc6873 (patch) | |
tree | 09a2073cb55a51305ae4642f3f47b669b21a9475 /macosx/Controller.mm | |
parent | 09a6c03875d3e89fd2d86663334842c8d7605028 (diff) |
MacGui: Fixed main window not showing updated filters settings after closing the picture window.
HandBrake gui is updated even when the user is pressing a button or a menu.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@940 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/Controller.mm')
-rw-r--r-- | macosx/Controller.mm | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/macosx/Controller.mm b/macosx/Controller.mm index 0b7df1e35..bf794a5e2 100644 --- a/macosx/Controller.mm +++ b/macosx/Controller.mm @@ -80,7 +80,7 @@ static int hb_group_count(hb_handle_t * h) [HBPreferencesController registerUserDefaults]; fHandle = NULL; outputPanel = [[HBOutputPanelController alloc] init]; - fPictureController = [[PictureController alloc] init]; + fPictureController = [[PictureController alloc] initWithDelegate:self]; fQueueController = [[HBQueueController alloc] init]; fAdvancedOptions = [[HBAdvancedController alloc] init]; return self; @@ -104,11 +104,11 @@ static int hb_group_count(hb_handle_t * h) fChapterTitlesDelegate = [[ChapterTitles alloc] init]; [fChapterTable setDataSource:fChapterTitlesDelegate]; - /* Call UpdateUI every 2/10 sec */ + /* Call UpdateUI every 1/2 sec */ [[NSRunLoop currentRunLoop] addTimer: [NSTimer - scheduledTimerWithTimeInterval: 0.2 target: self - selector: @selector( updateUI: ) userInfo: NULL repeats: FALSE] - forMode: NSModalPanelRunLoopMode]; + scheduledTimerWithTimeInterval: 0.5 target: self + selector: @selector( updateUI: ) userInfo: NULL repeats: YES] + forMode: NSEventTrackingRunLoopMode]; if( ( build = hb_check_update( fHandle, &version ) ) > -1 ) { @@ -688,8 +688,8 @@ static int hb_group_count(hb_handle_t * h) - (void) updateUI: (NSTimer *) timer { -hb_list_t * list; -list = hb_get_titles( fHandle ); + hb_list_t * list; + list = hb_get_titles( fHandle ); /* check to see if there has been a new scan done this bypasses the constraints of HB_STATE_WORKING not allowing setting a newly scanned source */ @@ -953,11 +953,6 @@ list = hb_get_titles( fHandle ); { [fQueueStatus setStringValue: @""]; } - - [[NSRunLoop currentRunLoop] addTimer: [NSTimer - scheduledTimerWithTimeInterval: 0.5 target: self - selector: @selector( updateUI: ) userInfo: NULL repeats: FALSE] - forMode: NSModalPanelRunLoopMode]; } - (IBAction) showNewScan:(id)sender @@ -1320,7 +1315,6 @@ list = hb_get_titles( fHandle ); if( returnCode == NSOKButton ) { [fDstFile2Field setStringValue: [sheet filename]]; - } } @@ -1329,10 +1323,11 @@ list = hb_get_titles( fHandle ); hb_list_t * list = hb_get_titles( fHandle ); hb_title_t * title = (hb_title_t *) hb_list_item( list, [fSrcTitlePopUp indexOfSelectedItem] ); - [fPictureController showPanelInWindow:fWindow forTitle:title]; - - [self calculatePictureSizing: sender]; +} + +- (void)pictureSettingsDidChange { + [self calculatePictureSizing: NULL]; } - (void) PrepareJob @@ -1772,7 +1767,7 @@ list = hb_get_titles( fHandle ); { 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 */ @@ -1816,7 +1811,6 @@ list = hb_get_titles( fHandle ); /* Pixel Ratio Setting */ if ([[NSUserDefaults standardUserDefaults] boolForKey:@"PixelRatio"]) { - job->pixel_ratio = 1 ; } else @@ -1903,7 +1897,6 @@ list = hb_get_titles( fHandle ); } - hb_list_t * list = hb_get_titles( fHandle ); hb_title_t * title = (hb_title_t *) hb_list_item( list, [fSrcTitlePopUp indexOfSelectedItem] ); |