Ignore:
Timestamp:
Dec 17, 2007, 10:30:28 PM (14 years ago)
Author:
livings124
Message:

fix sizing of group labels with long file names

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.m

    r4189 r4191  
    20492049- (void) menuNeedsUpdate: (NSMenu *) menu
    20502050{
    2051     #warning if not group menu, return
    2052     int i, keep = (menu == fGroupsSetMenu || menu == fGroupsSetContextMenu ) ? 2 : 0;
    2053     for (i = [menu numberOfItems]-1 - keep; i >= 0; i--)
    2054         [menu removeItemAtIndex: i];
    2055    
    2056     NSMenu * groupMenu = [[GroupsWindowController groupsController] groupMenuWithTarget: self action: @selector(setGroup:)];
    2057     [menu appendItemsFromMenu: groupMenu atIndexes: [NSIndexSet indexSetWithIndexesInRange: NSMakeRange(0, [groupMenu numberOfItems])]
    2058             atBottom: NO];
     2051    if (menu == fGroupsSetMenu || menu == fGroupsSetContextMenu)
     2052    {
     2053        int i, keep = (menu == fGroupsSetMenu || menu == fGroupsSetContextMenu) ? 2 : 0;
     2054        for (i = [menu numberOfItems]-1 - keep; i >= 0; i--)
     2055            [menu removeItemAtIndex: i];
     2056       
     2057        NSMenu * groupMenu = [[GroupsWindowController groupsController] groupMenuWithTarget: self action: @selector(setGroup:)];
     2058        [menu appendItemsFromMenu: groupMenu atIndexes: [NSIndexSet indexSetWithIndexesInRange:
     2059                NSMakeRange(0, [groupMenu numberOfItems])] atBottom: NO];
     2060    }
    20592061}
    20602062
Note: See TracChangeset for help on using the changeset viewer.