diff options
author | dynaflash <[email protected]> | 2010-08-05 16:45:00 +0000 |
---|---|---|
committer | dynaflash <[email protected]> | 2010-08-05 16:45:00 +0000 |
commit | cf982f896f80ed72e3c046dee0af49d1a1f4c9e6 (patch) | |
tree | 2fe600a3a615cb07ddd34cfb86b6fe8ab2ecc050 /macosx/HBPreviewController.m | |
parent | 254404475b82b21a5d49ee8c65f0df9e9937c0be (diff) |
MacGui: Disable preview hud controls during new source scans.
- Fixes a crash where trying to get a preview image when a new source is being loaded will cause a crash
- Mirrors enableUI in the main window.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3471 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBPreviewController.m')
-rw-r--r-- | macosx/HBPreviewController.m | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/macosx/HBPreviewController.m b/macosx/HBPreviewController.m index 10b239d5d..7fa8a8449 100644 --- a/macosx/HBPreviewController.m +++ b/macosx/HBPreviewController.m @@ -487,6 +487,28 @@ } #pragma mark Hud Control Overlay +/* enableHudControls and disableHudControls are used to sync enableUI + * in HBController so that during a scan we do not attempt to access source + * images, etc. which can cause a crash. In general this ui behavior will mirror + * the main window ui's enableUI method and in fact is called from there */ +- (void) enableHudControls +{ + [fPictureSlider setEnabled:YES]; + [fScaleToScreenToggleButton setEnabled:YES]; + [fCreatePreviewMovieButton setEnabled:YES]; + [fGoToStillPreviewButton setEnabled:YES]; + [fHBController writeToActivityLog: "Preview: Enabling HUD Controls"]; +} + +- (void) disableHudControls +{ + [fPictureSlider setEnabled:NO]; + [fScaleToScreenToggleButton setEnabled:NO]; + [fCreatePreviewMovieButton setEnabled:NO]; + [fGoToStillPreviewButton setEnabled:NO]; + [fHBController writeToActivityLog: "Preview: Disabling HUD Controls"]; +} + - (void) mouseMoved:(NSEvent *)theEvent { [super mouseMoved:theEvent]; |