aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableDocument.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2009-04-16 13:55:04 +0000
committerrowanbeentje <rowan@beent.je>2009-04-16 13:55:04 +0000
commit02cc3edfc5a0c64de768812220e78aba26aab81f (patch)
tree97627a337962cfc88fd52af6d98ef1b52aff1d7d /Source/TableDocument.m
parent20c46135604cfd3a38c55647438264e5360c80a4 (diff)
downloadsequelpro-02cc3edfc5a0c64de768812220e78aba26aab81f.tar.gz
sequelpro-02cc3edfc5a0c64de768812220e78aba26aab81f.tar.bz2
sequelpro-02cc3edfc5a0c64de768812220e78aba26aab81f.zip
- The connection sheet Edit button now opens the favourites list in preferences and selects appropriately; this resolves the initially planned changes for Issue #232.
- Move updateDefaultFavoritePopup in SPPreferenceController to a public method and set TableDocument to update it when adding favorites
Diffstat (limited to 'Source/TableDocument.m')
-rw-r--r--Source/TableDocument.m9
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/TableDocument.m b/Source/TableDocument.m
index f58b9b29..850ee443 100644
--- a/Source/TableDocument.m
+++ b/Source/TableDocument.m
@@ -41,6 +41,8 @@
#import "SPQueryConsole.h"
#import "CMMCPConnection.h"
#import "CMMCPResult.h"
+#import "MainController.h"
+#import "SPPreferenceController.h"
//used for printing
#import "MGTemplateEngine.h"
@@ -409,7 +411,11 @@ NSString *TableDocumentFavoritesControllerSelectionIndexDidChange = @"TableDocum
*/
- (IBAction)editFavorites:(id)sender
{
-
+ SPPreferenceController *prefsController = [[NSApp delegate] preferenceController];
+
+ [prefsController showWindow:self];
+ [prefsController displayFavoritePreferences:self];
+ [prefsController selectFavorites:[favoritesController selectedObjects]];
}
/**
@@ -481,6 +487,7 @@ NSString *TableDocumentFavoritesControllerSelectionIndexDidChange = @"TableDocum
[favoritesController addObject:newFavorite];
[favoritesController setSelectedObjects:[NSArray arrayWithObject:newFavorite]];
+ [[[NSApp delegate] preferenceController] updateDefaultFavoritePopup];
}
/**