aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbamse16 <marius@marius.me.uk>2009-07-16 13:42:25 +0000
committerbamse16 <marius@marius.me.uk>2009-07-16 13:42:25 +0000
commitb9a52df3071aba89d4e34410d58af56b0cea61ff (patch)
treeece462782ad52a1caff31cc1d4c7678ddbea13a3
parentc8f03febc0f77c7e89909348b7ac3609630d873f (diff)
downloadsequelpro-b9a52df3071aba89d4e34410d58af56b0cea61ff.tar.gz
sequelpro-b9a52df3071aba89d4e34410d58af56b0cea61ff.tar.bz2
sequelpro-b9a52df3071aba89d4e34410d58af56b0cea61ff.zip
Issue 240: Default connection not being set correctly, take 2.
Thanks to Rowan for suggestion where to actually look.
-rw-r--r--Source/SPPreferenceController.m10
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/SPPreferenceController.m b/Source/SPPreferenceController.m
index 4a0d308e..bf5d9389 100644
--- a/Source/SPPreferenceController.m
+++ b/Source/SPPreferenceController.m
@@ -877,8 +877,14 @@
[defaultFavoritePopup addItemWithTitle:@"Last Used"];
[[defaultFavoritePopup menu] addItem:[NSMenuItem separatorItem]];
- // Load in current favorites
- [defaultFavoritePopup addItemsWithTitles:[[favoritesController arrangedObjects] valueForKeyPath:@"name"]];
+ int i;
+ for(i=0; i<[[[favoritesController arrangedObjects] valueForKeyPath:@"name"] count]; i++ ){
+ NSMenuItem *favoritePrefMenuItem = [[NSMenuItem alloc] initWithTitle:[[[favoritesController arrangedObjects] valueForKeyPath:@"name"] objectAtIndex:i]
+ action:NULL
+ keyEquivalent:@"" ];
+ [[defaultFavoritePopup menu] addItem:favoritePrefMenuItem];
+ [favoritePrefMenuItem release];
+ }
// Add item to switch to edit favorites pane
[[defaultFavoritePopup menu] addItem:[NSMenuItem separatorItem]];