diff options
author | Bibiko <bibiko@eva.mpg.de> | 2010-06-25 23:08:48 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2010-06-25 23:08:48 +0000 |
commit | 0810ab9add13a0b3d08e720b09ec50018931dc42 (patch) | |
tree | 7a569d99f7333a9fe37a8cbb6036a228da5af521 /Source/SPAppController.m | |
parent | 4a9e9737832222dac26551c90af7279b348690b2 (diff) | |
download | sequelpro-0810ab9add13a0b3d08e720b09ec50018931dc42.tar.gz sequelpro-0810ab9add13a0b3d08e720b09ec50018931dc42.tar.bz2 sequelpro-0810ab9add13a0b3d08e720b09ec50018931dc42.zip |
• further progress for open/save session
- improved remembering of save accessory view settings
- if spfs file was saved encrypted ask for it while opening only once
• fixed typo while remembering the save accessory view setting for "Remember Query Editor content
Diffstat (limited to 'Source/SPAppController.m')
-rw-r--r-- | Source/SPAppController.m | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Source/SPAppController.m b/Source/SPAppController.m index f86a77cf..c0bc2818 100644 --- a/Source/SPAppController.m +++ b/Source/SPAppController.m @@ -327,6 +327,16 @@ NSFileManager *fileManager = [NSFileManager defaultManager]; + NSMutableDictionary *spfsDocData = [NSMutableDictionary dictionary]; + [spfsDocData setObject:[NSNumber numberWithBool:[[spfs objectForKey:@"encrypted"] boolValue]] forKey:@"encrypted"]; + [spfsDocData setObject:[NSNumber numberWithBool:[[spfs objectForKey:@"auto_connect"] boolValue]] forKey:@"auto_connect"]; + [spfsDocData setObject:[NSNumber numberWithBool:[[spfs objectForKey:@"save_password"] boolValue]] forKey:@"save_password"]; + [spfsDocData setObject:[NSNumber numberWithBool:[[spfs objectForKey:@"include_session"] boolValue]] forKey:@"include_session"]; + [spfsDocData setObject:[NSNumber numberWithBool:[[spfs objectForKey:@"save_editor_content"] boolValue]] forKey:@"save_editor_content"]; + + [[NSApp delegate] setSpfSessionDocData:spfsDocData]; + [[NSApp delegate] setSessionURL:filename]; + for(NSDictionary *window in [[[spfs objectForKey:@"windows"] reverseObjectEnumerator] allObjects]) { // Create a new window controller, and set up a new connection view within it. @@ -371,8 +381,8 @@ if ([[newWindowController window] isMiniaturized]) [[newWindowController window] deminiaturize:self]; [newWindowController addNewConnection:self]; - [[self frontDocument] initWithConnectionFile:fileName]; [[self frontDocument] setIsSavedInBundle:isBundleFile]; + [[self frontDocument] initWithConnectionFile:fileName]; } } else { @@ -385,16 +395,6 @@ } - NSMutableDictionary *spfsDocData = [NSMutableDictionary dictionary]; - [spfsDocData setObject:[NSNumber numberWithBool:[[spfs objectForKey:@"encrypted"] boolValue]] forKey:@"encrypted"]; - [spfsDocData setObject:[NSNumber numberWithBool:[[spfs objectForKey:@"auto_connect"] boolValue]] forKey:@"auto_connect"]; - [spfsDocData setObject:[NSNumber numberWithBool:[[spfs objectForKey:@"save_password"] boolValue]] forKey:@"save_password"]; - [spfsDocData setObject:[NSNumber numberWithBool:[[spfs objectForKey:@"include_session"] boolValue]] forKey:@"include_session"]; - [spfsDocData setObject:[NSNumber numberWithBool:[[spfs objectForKey:@"save_editor_content"] boolValue]] forKey:@"save_editor_content"]; - - [[NSApp delegate] spfSessionDocData:spfsDocData]; - [[NSApp delegate] setSessionURL:filename]; - } [spfs release]; |