diff options
author | ritsuka <[email protected]> | 2013-11-04 07:09:50 +0000 |
---|---|---|
committer | ritsuka <[email protected]> | 2013-11-04 07:09:50 +0000 |
commit | 85df20369cf73f5115a1707a47a7ac52f2881efb (patch) | |
tree | 65f37715730a25b1a4456e0c1930bbc28c8bc2e5 /macosx/PictureController.m | |
parent | d0bfc7cd9a4df6c6277f78161241ec8b93cac8f5 (diff) |
MacGUI: Refactor HBPreviewController. Rename the actual class to HBPreviewController, and move the image and video creation code to a separate HBPreviewGenerator class. Update the preview duration list as Rodeo suggested.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5874 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/PictureController.m')
-rw-r--r-- | macosx/PictureController.m | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/macosx/PictureController.m b/macosx/PictureController.m index e5b30844a..7bf9bf404 100644 --- a/macosx/PictureController.m +++ b/macosx/PictureController.m @@ -12,7 +12,7 @@ { hb_title_t * fTitle; - PreviewController * fPreviewController; + HBPreviewController * fPreviewController; /* Picture Sizing */ IBOutlet NSTabView * fSizeFilterView; @@ -126,7 +126,7 @@ _decombCustomString = @""; _denoiseCustomString = @""; - fPreviewController = [[PreviewController alloc] init]; + fPreviewController = [[HBPreviewController alloc] init]; } return self; @@ -191,12 +191,19 @@ - (void) setHandle: (hb_handle_t *) handle { - [fPreviewController SetHandle: handle]; - [fPreviewController setHBController:(HBController *)self.delegate]; + [fPreviewController setHandle: handle]; + [fPreviewController setDelegate:(HBController *)self.delegate]; } - (void) setTitle: (hb_title_t *) title { + fTitle = title; + + if (!title) { + [fPreviewController setTitle:NULL]; + return; + } + hb_job_t * job = title->job; fTitle = title; @@ -257,8 +264,9 @@ titleParWidth = job->anamorphic.par_width; titleParHeight = job->anamorphic.par_height; - [fPreviewController SetTitle:title]; + [fPreviewController setTitle:title]; + [self FilterSettingsChanged:nil]; [self settingsChanged:nil]; } @@ -504,7 +512,7 @@ - (void) reloadStillPreview { - [fPreviewController SetTitle:fTitle]; + [fPreviewController reload]; } #pragma mark - @@ -570,6 +578,9 @@ - (IBAction) settingsChanged: (id) sender { + if (!fTitle) + return; + hb_job_t * job = fTitle->job; /* if we are anything but strict anamorphic */ @@ -1038,6 +1049,9 @@ - (IBAction) FilterSettingsChanged: (id) sender { + if (!fTitle) + return; + self.detelecine = [fDetelecinePopUp indexOfSelectedItem]; [self adjustFilterDisplay:fDetelecinePopUp]; @@ -1070,10 +1084,9 @@ { fPreviewController.deinterlacePreview = NO; } - + self.grayscale = [fGrayscaleCheck state]; - - + if (sender != nil) { [self.delegate pictureSettingsDidChange]; |