summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordynaflash <[email protected]>2007-05-30 15:16:16 +0000
committerdynaflash <[email protected]>2007-05-30 15:16:16 +0000
commitabd735dd861a116521a84e9c8779073d30f4edaa (patch)
tree801ceb4c53646cd9042fb4fe15ddbcb9df8186cf
parente9fd0fa528672588f0fb0546148630fe7592b322 (diff)
MacGui: update scancontroller to help fix the HB floating window issue.
-Thanx Cleaner git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@595 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--macosx/ScanController.mm49
1 files changed, 18 insertions, 31 deletions
diff --git a/macosx/ScanController.mm b/macosx/ScanController.mm
index 937b177fa..f352cb57b 100644
--- a/macosx/ScanController.mm
+++ b/macosx/ScanController.mm
@@ -41,18 +41,9 @@
- (void) Show
{
-
- fDriveDetector = [[DriveDetector alloc] initWithCallback: self
- selector: @selector( openUpdateDrives: )];
- [fDriveDetector run];
-
- // Here down continue with existing HB
- [NSApp beginSheet: fPanel modalForWindow: fWindow
- modalDelegate: nil didEndSelector: nil contextInfo: nil];
- [NSApp runModalForWindow: fPanel];
- [NSApp endSheet: fPanel];
- [fPanel orderOut: self];
-
+ fDriveDetector = [[DriveDetector alloc] initWithCallback:self selector:@selector(openUpdateDrives:)];
+ [fDriveDetector run];
+ [NSApp beginSheet:fPanel modalForWindow:fWindow modalDelegate:nil didEndSelector:NULL contextInfo:NULL];
}
- (void) openUpdateDrives: (NSDictionary *) drives
@@ -132,16 +123,16 @@
[self EnableUI: YES];
[fIndicator setDoubleValue: 0.0];
- if( hb_list_count( hb_get_titles( fHandle ) ) )
- {
- /* Success */
- [fStatusField setStringValue: @""];
- [NSApp abortModal];
+ if (hb_list_count(hb_get_titles(fHandle)))
+ {
+ [fStatusField setStringValue:@""];
+ [NSApp endSheet:fPanel];
+ [fPanel orderOut:self];
+
}
else
{
- [fStatusField setStringValue:
- _( @"No valid title found." )];
+ [fStatusField setStringValue:_( @"No valid title found.")];
}
break;
}
@@ -178,9 +169,9 @@
done right afterwards */
- (IBAction) Browse: (id) sender
{
- [NSApp stopModal];
- [self performSelectorOnMainThread: @selector( Browse2: )
- withObject: nil waitUntilDone: NO];
+ [NSApp endSheet:fPanel];
+ [fPanel orderOut:self];
+ [self performSelectorOnMainThread:@selector(Browse2:) withObject:nil waitUntilDone:NO];
}
- (void) Browse2: (id) sender
{
@@ -223,18 +214,12 @@
}
- (void) BrowseDone2: (id) sender
{
- [NSApp beginSheet: fPanel modalForWindow: fWindow
- modalDelegate: nil didEndSelector: nil contextInfo: nil];
- [NSApp runModalForWindow: fWindow];
- [NSApp endSheet: fPanel];
- [fPanel orderOut: self];
+ [NSApp beginSheet:fPanel modalForWindow:fWindow modalDelegate:nil didEndSelector:NULL contextInfo:NULL];
}
- (IBAction) Open: (id) sender
{
- // NSString * path;
-
- [self EnableUI: NO];
+ [self EnableUI: NO];
[fStatusField setStringValue: _( @"Opening..." )];
// From IHB
@@ -259,7 +244,9 @@
- (IBAction) Cancel: (id) sender
{
- [NSApp stopModal];
+ //[NSApp stopModal];
+ [NSApp endSheet:fPanel];
+ [fPanel orderOut:self];
}
@end