diff options
author | Bibiko <bibiko@eva.mpg.de> | 2009-10-15 09:53:59 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2009-10-15 09:53:59 +0000 |
commit | a1f940c4592776c23d335d76232441aad3157eec (patch) | |
tree | db190d5dcfdb4d23cda767c48dbe594904c5636c /Source | |
parent | 0eb001d5b887776b827d503568921f6230bf862a (diff) | |
download | sequelpro-a1f940c4592776c23d335d76232441aad3157eec.tar.gz sequelpro-a1f940c4592776c23d335d76232441aad3157eec.tar.bz2 sequelpro-a1f940c4592776c23d335d76232441aad3157eec.zip |
• SPF file: remember/restore 'connectionEncoding' and 'toolbar visibility'
Diffstat (limited to 'Source')
-rw-r--r-- | Source/TableDocument.m | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Source/TableDocument.m b/Source/TableDocument.m index 427e73fd..46423f2c 100644 --- a/Source/TableDocument.m +++ b/Source/TableDocument.m @@ -476,6 +476,10 @@ if([tables indexOfObject:[spfSession objectForKey:@"table"]] == NSNotFound) return; + // Restore toolbar setting + if([spfSession objectForKey:@"isToolbarVisible"]) + [[tableWindow toolbar] setVisible:[[spfSession objectForKey:@"isToolbarVisible"] boolValue]]; + // TODO up to now it doesn't work if([spfSession objectForKey:@"contentSelectedIndexSet"]) { NSMutableIndexSet *anIndexSet = [NSMutableIndexSet indexSet]; @@ -500,7 +504,10 @@ // Select table [tablesListInstance selectTableAtIndex:[NSNumber numberWithInt:[tables indexOfObject:[spfSession objectForKey:@"table"]]]]; - // [tablesListInstance setContentRequiresReload:YES]; + + // Reset database view encoding if differs from default + if([spfSession objectForKey:@"connectionEncoding"] && ![[self connectionEncoding] isEqualToString:[spfSession objectForKey:@"connectionEncoding"]]) + [self setConnectionEncoding:[spfSession objectForKey:@"connectionEncoding"] reloadingViews:YES]; // Select view if([[spfSession objectForKey:@"view"] isEqualToString:@"SP_VIEW_STRUCTURE"]) @@ -2479,6 +2486,9 @@ } [session setObject:aString forKey:@"view"]; + [session setObject:[NSNumber numberWithBool:[[tableWindow toolbar] isVisible]] forKey:@"isToolbarVisible"]; + [session setObject:[self connectionEncoding] forKey:@"connectionEncoding"]; + [session setObject:[NSNumber numberWithBool:[tableContentInstance sortColumnIsAscending]] forKey:@"contentSortColIsAsc"]; [session setObject:[NSNumber numberWithInt:[tableContentInstance limitStart]] forKey:@"contentLimitStartPosition"]; [session setObject:NSStringFromRect([tableContentInstance viewport]) forKey:@"contentViewport"]; |