aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/MainController.m5
-rw-r--r--Source/TableDocument.m8
2 files changed, 9 insertions, 4 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;
}
diff --git a/Source/TableDocument.m b/Source/TableDocument.m
index 738af532..012b30dc 100644
--- a/Source/TableDocument.m
+++ b/Source/TableDocument.m
@@ -139,6 +139,10 @@ NSString *TableDocumentFavoritesControllerFavoritesDidChange = @"TableDocumentFa
- (IBAction)connect:(id)sender
{
int code;
+
+ // Save the favourites - commits any unsaved changes ie favourite renames
+ [prefs setObject:[self favorites] forKey:@"favorites"];
+ [prefs synchronize];
[connectProgressBar startAnimation:self];
[connectProgressStatusText setHidden:NO];
@@ -1650,10 +1654,6 @@ objectValueForTableColumn:(NSTableColumn *)aTableColumn
- (IBAction)terminate:(id)sender
{
[[NSApp orderedDocuments] makeObjectsPerformSelector:@selector(cancelConnectSheet:) withObject:nil];
-
- // Save the favourites - commits any unsaved changes ie favourite renames
- [prefs setObject:[self favorites] forKey:@"favorites"];
-
[NSApp terminate:sender];
}