Changeset 4184


Ignore:
Timestamp:
Dec 17, 2007, 4:32:32 PM (14 years ago)
Author:
livings124
Message:

enable and check group menu items appropriately; update news

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEWS

    r4143 r4184  
    99- OS X:
    1010   + Redesigned Leopard-like look
     11   + Group labels
    1112   + Statistics window
    1213   + Pieces Bar (return of Advanced Bar)
  • trunk/macosx/Controller.m

    r4183 r4184  
    30773077    }
    30783078   
     3079    if (action == @selector(setGroup:))
     3080    {
     3081        BOOL checked = NO;
     3082       
     3083        int index = [[menuItem representedObject] intValue];
     3084        NSEnumerator * enumerator = [[fDisplayedTorrents objectsAtIndexes: [fTableView selectedRowIndexes]] objectEnumerator];
     3085        Torrent * torrent;
     3086        while ((torrent = [enumerator nextObject]))
     3087            if (index == [torrent groupValue])
     3088            {
     3089                checked = YES;
     3090                break;
     3091            }
     3092       
     3093        [menuItem setState: checked ? NSOnState : NSOffState];
     3094        return canUseTable && [fTableView numberOfSelectedRows] > 0;
     3095    }
     3096   
    30793097    if (action == @selector(toggleSmallView:))
    30803098    {
Note: See TracChangeset for help on using the changeset viewer.