OSDN Git Service

MacGui: Fix destination path so that last one used in the destination choice window...
authordynaflash <dynaflash@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Thu, 11 Dec 2008 15:59:55 +0000 (15:59 +0000)
committerdynaflash <dynaflash@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Thu, 11 Dec 2008 15:59:55 +0000 (15:59 +0000)
- Addressed here http://forum.handbrake.fr/viewtopic.php?f=12&t=8281

git-svn-id: svn://localhost/HandBrake/trunk@2019 b64f7644-9d1e-0410-96f1-a4d463321fa5

macosx/Controller.mm

index 1da9162..0a84282 100644 (file)
@@ -1519,11 +1519,14 @@ static NSString *        ChooseSourceIdentifier             = @"Choose Source It
 }
 
 - (void) browseFileDone: (NSSavePanel *) sheet
-    returnCode: (int) returnCode contextInfo: (void *) contextInfo
+             returnCode: (int) returnCode contextInfo: (void *) contextInfo
 {
     if( returnCode == NSOKButton )
     {
         [fDstFile2Field setStringValue: [sheet filename]];
+        /* Save this path to the prefs so that on next browse destination window it opens there */
+        NSString *destinationDirectory = [[fDstFile2Field stringValue] stringByDeletingLastPathComponent];
+        [[NSUserDefaults standardUserDefaults] setObject:destinationDirectory forKey:@"LastDestinationDirectory"];   
     }
 }
 
@@ -3276,15 +3279,13 @@ fWorkingCount = 0;
          otherwise, just rip the queue */
         if(fPendingCount == 0)
         {
-         [self writeToActivityLog: "Rip: No pending jobs, so sending this one to doAddToQueue"];
-               [self doAddToQueue];
+            [self writeToActivityLog: "Rip: No pending jobs, so sending this one to doAddToQueue"];
+            [self doAddToQueue];
         }
         
-        NSString *destinationDirectory = [[fDstFile2Field stringValue] stringByDeletingLastPathComponent];
-        [[NSUserDefaults standardUserDefaults] setObject:destinationDirectory forKey:@"LastDestinationDirectory"];
         /* go right to processing the new queue encode */
-       [self writeToActivityLog: "Rip: Going right to performNewQueueScan"];
-         [self performNewQueueScan:[[QueueFileArray objectAtIndex:currentQueueEncodeIndex] objectForKey:@"SourcePath"] scanTitleNum:[[[QueueFileArray objectAtIndex:currentQueueEncodeIndex] objectForKey:@"TitleNumber"]intValue]]; 
+        [self writeToActivityLog: "Rip: Going right to performNewQueueScan"];
+        [self performNewQueueScan:[[QueueFileArray objectAtIndex:currentQueueEncodeIndex] objectForKey:@"SourcePath"] scanTitleNum:[[[QueueFileArray objectAtIndex:currentQueueEncodeIndex] objectForKey:@"TitleNumber"]intValue]]; 
         
     }
 }