diff options
author | ritsuka <[email protected]> | 2013-11-02 18:09:06 +0000 |
---|---|---|
committer | ritsuka <[email protected]> | 2013-11-02 18:09:06 +0000 |
commit | b94f4686f052a9129c54b0bb5af39d6e86554872 (patch) | |
tree | 0a8f2e4b3e8dd0e55f9cb4c63dd5d7cbd4fb171d /macosx/Controller.m | |
parent | 4da46e1fe6b357db3434553f67acf06e3a0ac58b (diff) |
MacGUI: refactor PictureController. kill a bit of dead code (~500 lines), switch some ivars to properties, hide the private methods and rework the deinterlace logic. Plus UI alignment.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5869 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/Controller.m')
-rw-r--r-- | macosx/Controller.m | 29 |
1 files changed, 7 insertions, 22 deletions
diff --git a/macosx/Controller.m b/macosx/Controller.m index 56fcd0ea7..413963b1d 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -93,7 +93,7 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It error:NULL]; } outputPanel = [[HBOutputPanelController alloc] init]; - fPictureController = [[PictureController alloc] init]; + fPictureController = [[HBPictureController alloc] init]; fQueueController = [[HBQueueController alloc] init]; fAdvancedOptions = [[HBAdvancedController alloc] init]; /* we init the HBPresets class which currently is only used @@ -209,8 +209,8 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It // Set the Growl Delegate [GrowlApplicationBridge setGrowlDelegate: self]; /* Init others controllers */ - [fPictureController SetHandle: fHandle]; - [fPictureController setHBController: self]; + [fPictureController setHandle: fHandle]; + [fPictureController setDelegate: self]; [fQueueController setHandle: fQueueEncodeLibhb]; [fQueueController setHBController: self]; @@ -809,17 +809,12 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It if (b) { - /* we also call calculatePictureSizing here to sense check if we already have vfr selected */ [self calculatePictureSizing:nil]; - /* Also enable the preview window hud controls */ - [fPictureController enablePreviewHudControls]; } else { - [fPresetsOutlineView setEnabled: NO]; - [fPictureController disablePreviewHudControls]; } [self videoMatrixChanged:nil]; @@ -3356,7 +3351,7 @@ fWorkingCount = 0; } /* we call SetTitle: in fPictureController so we get an instant update in the Picture Settings window */ - [fPictureController SetTitle:fTitle]; + [fPictureController setTitle:fTitle]; [self calculatePictureSizing:nil]; /* somehow we need to figure out a way to tie the queue item to a preset if it used one */ @@ -4874,7 +4869,7 @@ bool one_burned = FALSE; AutoCropRight = title->crop[3]; /* Reset the new title in fPictureController && fPreviewController*/ - [fPictureController SetTitle:title]; + [fPictureController setTitle:title]; /* Update Subtitle Table */ @@ -5861,10 +5856,6 @@ the user is using "Custom" settings by determining the sender*/ fX264PresetsHeightForUnparse = fTitle->job->height; // width or height may have changed, unparse [self x264PresetsChangedDisplayExpandedOptions:nil]; - - // reload still previews - // note: fTitle->job->deinterlace is set by fPictureController now - [fPictureController decombDeinterlacePreviewImage]; } #pragma mark - @@ -5875,7 +5866,7 @@ the user is using "Custom" settings by determining the sender*/ NSMutableString *summary = [NSMutableString stringWithString:@""]; if (fPictureController && fTitle && fTitle->job) { - [summary appendString:[fPictureController getPictureSizeInfoString]]; + [summary appendString:[fPictureController pictureSizeInfoString]]; if (fTitle->job->anamorphic.mode != 1) { // anamorphic is not Strict, show the modulus @@ -6158,11 +6149,6 @@ the user is using "Custom" settings by determining the sender*/ [fPictureController showPictureWindow:sender]; } -- (void) picturePanelWindowed -{ - [fPictureController setToWindowedMode]; -} - - (IBAction) showPreviewWindow: (id) sender { [fPictureController showPreviewWindow:sender]; @@ -6958,8 +6944,7 @@ return YES; } } /* we call SetTitle: in fPictureController so we get an instant update in the Picture Settings window */ - [fPictureController SetTitle:fTitle]; - [fPictureController SetTitle:fTitle]; + [fPictureController setTitle:fTitle]; [self calculatePictureSizing:nil]; } } |