summaryrefslogtreecommitdiffstats
path: root/macosx/ExpressController.m
diff options
context:
space:
mode:
authortiter <[email protected]>2006-03-18 21:57:13 +0000
committertiter <[email protected]>2006-03-18 21:57:13 +0000
commite3cd96683d5137f1aefef861ae40f7d0de93a7cb (patch)
tree4a1419cdab7b188853655f56d45a44e81d73cdba /macosx/ExpressController.m
parent111307fa9186021aef60d28e6b707c93190d5407 (diff)
Moves drive detection to a seperate class
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@43 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/ExpressController.m')
-rw-r--r--macosx/ExpressController.m18
1 files changed, 18 insertions, 0 deletions
diff --git a/macosx/ExpressController.m b/macosx/ExpressController.m
index cad330872..fb881fa52 100644
--- a/macosx/ExpressController.m
+++ b/macosx/ExpressController.m
@@ -1,7 +1,9 @@
#import "ExpressController.h"
+#import "DriveDetector.h"
@interface ExpressController (Private)
+- (void) openUpdateDrives: (NSArray *) drives;
- (void) openBrowseDidEnd: (NSOpenPanel *) sheet returnCode: (int)
returnCode contextInfo: (void *) contextInfo;
- (void) openEnable: (BOOL) b;
@@ -20,6 +22,8 @@
- (void) awakeFromNib
{
/* Show the "Open DVD" interface */
+ fDriveDetector = [[DriveDetector alloc] initWithCallback: self
+ selector: @selector( openUpdateDrives: )];
[self openEnable: YES];
[fWindow setContentSize: [fOpenView frame].size];
[fWindow setContentView: fOpenView];
@@ -126,6 +130,9 @@
[fWindow setContentView: fEmptyView];
[fWindow setFrame: frame display: YES animate: YES];
[fWindow setContentView: fOpenView];
+
+ fDriveDetector = [[DriveDetector alloc] initWithCallback: self
+ selector: @selector( openUpdateDrives: )];
}
- (void) openMatrixChanged: (id) sender
@@ -215,6 +222,16 @@
@implementation ExpressController (Private)
+- (void) openUpdateDrives: (NSArray *) drives
+{
+ [fOpenPopUp removeAllItems];
+ [fOpenPopUp addItemsWithTitles: drives];
+ if( [fOpenPopUp numberOfItems] )
+ {
+ [fOpenPopUp selectItemAtIndex: 0];
+ }
+}
+
- (void) openBrowseDidEnd: (NSOpenPanel *) sheet returnCode: (int)
returnCode contextInfo: (void *) contextInfo
{
@@ -275,6 +292,7 @@
if( hb_list_count( fList ) )
{
+ [fDriveDetector release];
[self convertShow];
}
break;