summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authordynaflash <[email protected]>2007-08-27 13:34:50 +0000
committerdynaflash <[email protected]>2007-08-27 13:34:50 +0000
commit8f0c1789b622824d5d2728656cf5beb0bc50a044 (patch)
tree07445fdfcc7125d874734115e39efced8a775901 /macosx
parent97a876d5b734867bf74b6745c280362b3fe6338b (diff)
MacGui: disable interface during scanning, and if there is no valid title found
- Prevents crashing when attmepting to access audio variables when a valid source is not present. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@876 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx')
-rw-r--r--macosx/Controller.mm34
1 files changed, 14 insertions, 20 deletions
diff --git a/macosx/Controller.mm b/macosx/Controller.mm
index 62ef8e773..5410ba041 100644
--- a/macosx/Controller.mm
+++ b/macosx/Controller.mm
@@ -674,16 +674,8 @@ list = hb_get_titles( fHandle );
[fScanIndicator setIndeterminate: NO];
[fScanIndicator setDoubleValue: 0.0];
[fScanIndicator setHidden: YES];
- //[fScanController Cancel: NULL];
- /* Enable/Disable Menu Controls Accordingly */
- [fMenuOpenSource setEnabled: YES];
- [fMenuStartEncode setEnabled: YES];
- [fMenuAddToQueue setEnabled: YES];
-
- [fMenuPicturePanelShow setEnabled: YES];
- [fMenuQueuePanelShow setEnabled: YES];
+
[self showNewScan: NULL];
-
}
@@ -935,24 +927,24 @@ list = hb_get_titles( fHandle );
if( !hb_list_count( list ) )
{
/* We display a message if a valid dvd source was not chosen */
- if (sourceDisplayName)
- {
- /* Temporary string if til restoring old source is fixed */
- [fSrcDVD2Field setStringValue: @"Not A Valid Source"];
- //[fSrcDVD2Field setStringValue: [NSString stringWithFormat: @"%s", sourceDisplayName]];
- }
- else
- {
- [fSrcDVD2Field setStringValue: @"No Valid Title Found"];
- }
+ [fSrcDVD2Field setStringValue: @"No Valid Title Found"];
+ [fMenuOpenSource setEnabled: YES];
}
else
{
- /* We increment the successful scancount here by one,
+ /* We increment the successful scancount here by one,
which we use at the end of this function to tell the gui
if this is the first successful scan since launch and whether
or not we should set all settings to the defaults */
currentSuccessfulScanCount++;
+
+ [self enableUI: YES];
+ /* Enable/Disable Menu Controls Accordingly */
+ [fMenuOpenSource setEnabled: YES];
+ [fMenuStartEncode setEnabled: YES];
+ [fMenuAddToQueue setEnabled: YES];
+ [fMenuPicturePanelShow setEnabled: YES];
+ [fMenuQueuePanelShow setEnabled: YES];
[fSrcTitlePopUp removeAllItems];
for( int i = 0; i < hb_list_count( list ); i++ )
@@ -1148,6 +1140,7 @@ list = hb_get_titles( fHandle );
[fMenuPicturePanelShow setEnabled: NO];
[fMenuQueuePanelShow setEnabled: NO];
+ [self enableUI: NO];
[self browseSources:NULL];
}
@@ -1214,6 +1207,7 @@ list = hb_get_titles( fHandle );
[fMenuStartEncode setEnabled: YES];
[fMenuPicturePanelShow setEnabled: YES];
[fMenuQueuePanelShow setEnabled: YES];
+ [self enableUI: YES];
}
}
}