diff options
author | stuconnolly <stuart02@gmail.com> | 2010-12-11 21:52:44 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2010-12-11 21:52:44 +0000 |
commit | 1ddca4732c3aa46698b8fad25ce1294db3cd32fb (patch) | |
tree | 177ce5977ef37ea98ceae04bbce2f9ba73a0da4d /Source/SPStringAdditions.m | |
parent | 66f0041a06b8710cd3ed3b5ff2c8cbb54004efba (diff) | |
parent | cb2baf9cb4ce1e33e6756969b1f71eb0e011f2c8 (diff) | |
download | sequelpro-1ddca4732c3aa46698b8fad25ce1294db3cd32fb.tar.gz sequelpro-1ddca4732c3aa46698b8fad25ce1294db3cd32fb.tar.bz2 sequelpro-1ddca4732c3aa46698b8fad25ce1294db3cd32fb.zip |
Bring outlineview branch up to date with trunk (r2989:3005).
Diffstat (limited to 'Source/SPStringAdditions.m')
-rw-r--r-- | Source/SPStringAdditions.m | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/SPStringAdditions.m b/Source/SPStringAdditions.m index 97339201..a3098750 100644 --- a/Source/SPStringAdditions.m +++ b/Source/SPStringAdditions.m @@ -462,7 +462,7 @@ NSMutableArray *scriptHeaderArguments = [NSMutableArray array]; NSString *scriptPath = @""; - NSString *uuid = (contextInfo && [contextInfo objectForKey:SPBundleFileInternalexecutionUUID]) ? [contextInfo objectForKey:@"exeUUID"] : [NSString stringWithNewUUID]; + NSString *uuid = (contextInfo && [contextInfo objectForKey:SPBundleFileInternalexecutionUUID]) ? [contextInfo objectForKey:SPBundleFileInternalexecutionUUID] : [NSString stringWithNewUUID]; NSString *stdoutFilePath = [NSString stringWithFormat:@"%@_%@", SPBundleTaskOutputFilePath, uuid]; NSString *scriptFilePath = [NSString stringWithFormat:@"%@_%@", SPBundleTaskScriptCommandFilePath, uuid]; @@ -537,14 +537,14 @@ if([[[NSApp mainWindow] delegate] respondsToSelector:@selector(selectedTableDocument)]) doc = [[[NSApp mainWindow] delegate] selectedTableDocument]; // Check if connected - if([[doc connectionID] isEqualToString:@"_"]) + if([doc getConnection] == nil) doc = nil; else { for (NSWindow *aWindow in [NSApp orderedWindows]) { if([[[[aWindow windowController] class] description] isEqualToString:@"SPWindowController"]) { if([[[aWindow windowController] documents] count] && [[[[[[aWindow windowController] documents] objectAtIndex:0] class] description] isEqualToString:@"SPDatabaseDocument"]) { // Check if connected - if(![[[[[aWindow windowController] documents] objectAtIndex:0] connectionID] isEqualToString:@"_"]) + if([[[[aWindow windowController] documents] objectAtIndex:0] getConnection]) doc = [[[aWindow windowController] documents] objectAtIndex:0]; else doc = nil; @@ -567,6 +567,9 @@ if([doc shellVariables]) [theEnv addEntriesFromDictionary:[doc shellVariables]]; + if([theEnv objectForKey:SPBundleShellVariableCurrentEditedColumnName] && [[theEnv objectForKey:SPBundleShellVariableDataTableSource] isEqualToString:@"content"]) + [theEnv setObject:[theEnv objectForKey:SPBundleShellVariableSelectedTable] forKey:SPBundleShellVariableCurrentEditedTable]; + } if(theEnv != nil && [theEnv count]) |