From b9a52df3071aba89d4e34410d58af56b0cea61ff Mon Sep 17 00:00:00 2001 From: bamse16 Date: Thu, 16 Jul 2009 13:42:25 +0000 Subject: Issue 240: Default connection not being set correctly, take 2. Thanks to Rowan for suggestion where to actually look. --- Source/SPPreferenceController.m | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'Source') 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]]; -- cgit v1.2.3