summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordynaflash <[email protected]>2007-11-21 15:42:00 +0000
committerdynaflash <[email protected]>2007-11-21 15:42:00 +0000
commitab407726d79cfcda9a6c32b54e18f5f643965d19 (patch)
tree700965d5afe59b8a40eec96714bb8e3e4a291e92
parent29d3f70f98a37961181bc995d47062f43201f142 (diff)
MacGui: fix open last used source directory. broken in rev. 1067
- Fix issue since 1067 where open the browse window to scan a new source would just default to "/" instead of the last chosen source directory. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1073 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--macosx/Controller.mm15
1 files changed, 9 insertions, 6 deletions
diff --git a/macosx/Controller.mm b/macosx/Controller.mm
index 79c9d6c94..46675ebed 100644
--- a/macosx/Controller.mm
+++ b/macosx/Controller.mm
@@ -1095,9 +1095,12 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It
{
NSString *scanPath = [[sheet filenames] objectAtIndex: 0];
+ /* we set the last searched source directory in the prefs here */
+ NSString *sourceDirectory = [scanPath stringByDeletingLastPathComponent];
+ [[NSUserDefaults standardUserDefaults] setObject:sourceDirectory forKey:@"LastSourceDirectory"];
/* we order out sheet, which is the browse window as we need to open
- * the title selection sheet right away
- */
+ * the title selection sheet right away
+ */
[sheet orderOut: self];
if (sender == fOpenSourceTitleMMenu)
@@ -1146,7 +1149,7 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It
}
}
}
-
+
/* Here we open the title selection sheet where we can specify an exact title to be scanned */
- (IBAction) showSourceTitleScanPanel: (id) sender
{
@@ -1162,6 +1165,9 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It
{
[NSApp endSheet: fScanSrcTitlePanel];
[fScanSrcTitlePanel orderOut: self];
+
+
+
if(sender == fScanSrcTitleOpenButton)
{
/* We setup the scan status in the main window to indicate a source title scan */
@@ -1170,9 +1176,6 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It
[fScanIndicator setIndeterminate: YES];
[fScanIndicator startAnimation: nil];
- /* we set the last source directory in the prefs here */
- NSString *sourceDirectory = [[fScanSrcTitlePathField stringValue] stringByDeletingLastPathComponent];
- [[NSUserDefaults standardUserDefaults] setObject:sourceDirectory forKey:@"LastSourceDirectory"];
/* We use the performScan method to actually perform the specified scan passing the path and the title
* to be scanned
*/