aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPGeneralPreferencePane.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2011-03-20 18:45:52 +0000
committerstuconnolly <stuart02@gmail.com>2011-03-20 18:45:52 +0000
commitd2fe0ef7b3fe6a5d6fffc4caefdb6e5b465a621d (patch)
treef05c372a5d92882617eb484a01676802f5f8a3d7 /Source/SPGeneralPreferencePane.m
parent3e799650da5898cf3e59acecba27a74b95e17ebc (diff)
downloadsequelpro-d2fe0ef7b3fe6a5d6fffc4caefdb6e5b465a621d.tar.gz
sequelpro-d2fe0ef7b3fe6a5d6fffc4caefdb6e5b465a621d.tar.bz2
sequelpro-d2fe0ef7b3fe6a5d6fffc4caefdb6e5b465a621d.zip
Fix bug that prevented nested groups from being indented properly in the default favorite popup button.
Diffstat (limited to 'Source/SPGeneralPreferencePane.m')
-rw-r--r--Source/SPGeneralPreferencePane.m5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/SPGeneralPreferencePane.m b/Source/SPGeneralPreferencePane.m
index d8daa229..fc2b4014 100644
--- a/Source/SPGeneralPreferencePane.m
+++ b/Source/SPGeneralPreferencePane.m
@@ -115,7 +115,7 @@ static NSString *SPDatabaseImage = @"database-small";
* @return The menu item
*/
- (NSArray *)_constructMenuItemsForNode:(SPTreeNode *)node atLevel:(NSUInteger)level
-{
+{
NSMutableArray *items = [NSMutableArray array];
if ([node isGroup]) {
@@ -126,8 +126,11 @@ static NSString *SPDatabaseImage = @"database-small";
NSMenuItem *groupItem = [[NSMenuItem alloc] initWithTitle:[groupNode nodeName] action:NULL keyEquivalent:@""];
+ NSUInteger groupLevel = (level - 1);
+
[groupItem setEnabled:NO];
[groupItem setImage:folderImage];
+ [groupItem setIndentationLevel:groupLevel];
[items addObject:groupItem];