aboutsummaryrefslogtreecommitdiffstats
path: root/Source/MainController.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2009-03-28 00:31:08 +0000
committerrowanbeentje <rowan@beent.je>2009-03-28 00:31:08 +0000
commit905a44014caa805f2b2621bedef3a76da259c8b1 (patch)
tree947b885e6c98f019c90c90a86fdb5284e6ef2cd6 /Source/MainController.m
parent22ee41bd30eb6954492b480484b70a9de9a75374 (diff)
downloadsequelpro-905a44014caa805f2b2621bedef3a76da259c8b1.tar.gz
sequelpro-905a44014caa805f2b2621bedef3a76da259c8b1.tar.bz2
sequelpro-905a44014caa805f2b2621bedef3a76da259c8b1.zip
Improve interaction with connection favorites to prevent issues saving favorite changes:
- Favorites are no longer resaved on document window close - instead they're saved on connect. Prevents the oldest window open from saving its favorites when closed, overwriting any changes since. - Explicitly synchs changes to disk to ensure prefs window/connection sheets see each other's changes faster.
Diffstat (limited to 'Source/MainController.m')
-rw-r--r--Source/MainController.m5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/MainController.m b/Source/MainController.m
index c5e2eeb0..8c76014a 100644
--- a/Source/MainController.m
+++ b/Source/MainController.m
@@ -33,6 +33,10 @@ opens the preferences window
*/
- (IBAction)openPreferences:(id)sender
{
+
+ // Synchronize the prefs to disk to pick up any changes made to favourites in connection sheets
+ [prefs synchronize];
+
//get favorites if they exist
[favorites release];
if ( [prefs objectForKey:@"favorites"] != nil ) {
@@ -627,6 +631,7 @@ checks for updates and opens download page in default browser
[prefs setObject:[encodingPopUpButton titleOfSelectedItem] forKey:@"encoding"];
[prefs setObject:favorites forKey:@"favorites"];
+ [prefs synchronize];
}
return YES;
}