From d2fe0ef7b3fe6a5d6fffc4caefdb6e5b465a621d Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Sun, 20 Mar 2011 18:45:52 +0000 Subject: Fix bug that prevented nested groups from being indented properly in the default favorite popup button. --- Source/SPGeneralPreferencePane.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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]; -- cgit v1.2.3