Changeset 7427


Ignore:
Timestamp:
Dec 17, 2008, 2:19:14 AM (12 years ago)
Author:
livings124
Message:

cleanup for the group menu filling adjustment

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEWS

    r7381 r7427  
    77   + Support BitTorrent Enhancement Proposal #6 "Fast Extension"
    88   + Support BitTorrent Enhancement Proposal #21 "Extension for Partial Seeds"
     9   + Random port, with optional randomization on startup
    910- Mac
    1011   + Groups (moved to preferences) can be auto-assigned to transfers when adding based on name and tracker (10.5-only)
  • trunk/Transmission.xcodeproj/project.pbxproj

    r7420 r7427  
    106106                A233BD330D8C6585007EE7B4 /* MessageWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = A233BD320D8C6585007EE7B4 /* MessageWindow.xib */; };
    107107                A233BD690D8CF2C7007EE7B4 /* StatsWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = A233BD680D8CF2C7007EE7B4 /* StatsWindow.xib */; };
    108                 A234D0D20C79FB3600A82373 /* NSMenuAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = A234D0D00C79FB3600A82373 /* NSMenuAdditions.m */; };
    109108                A2385DD40BFE06C800B24EF6 /* DragOverlayWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = A2385DD20BFE06C800B24EF6 /* DragOverlayWindow.m */; };
    110109                A2399CCD0CD3852300225B2B /* NSApplicationAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = A2399CCC0CD3852300225B2B /* NSApplicationAdditions.m */; };
     
    507506                A233BD320D8C6585007EE7B4 /* MessageWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = MessageWindow.xib; path = macosx/MessageWindow.xib; sourceTree = "<group>"; };
    508507                A233BD680D8CF2C7007EE7B4 /* StatsWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = StatsWindow.xib; path = macosx/StatsWindow.xib; sourceTree = "<group>"; };
    509                 A234D0CF0C79FB3600A82373 /* NSMenuAdditions.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = NSMenuAdditions.h; path = macosx/NSMenuAdditions.h; sourceTree = "<group>"; };
    510                 A234D0D00C79FB3600A82373 /* NSMenuAdditions.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = NSMenuAdditions.m; path = macosx/NSMenuAdditions.m; sourceTree = "<group>"; };
    511508                A2385DD20BFE06C800B24EF6 /* DragOverlayWindow.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = DragOverlayWindow.m; path = macosx/DragOverlayWindow.m; sourceTree = "<group>"; };
    512509                A2385DD30BFE06C800B24EF6 /* DragOverlayWindow.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = DragOverlayWindow.h; path = macosx/DragOverlayWindow.h; sourceTree = "<group>"; };
     
    12491246                                A215760A0C0D449A0057A26A /* NSBezierPathAdditions.h */,
    12501247                                A21576090C0D449A0057A26A /* NSBezierPathAdditions.m */,
    1251                                 A234D0CF0C79FB3600A82373 /* NSMenuAdditions.h */,
    1252                                 A234D0D00C79FB3600A82373 /* NSMenuAdditions.m */,
    12531248                        );
    12541249                        name = Additions;
     
    19041899                                35F373030C2DA89000DAA8F2 /* FilePriorityCell.m in Sources */,
    19051900                                A2085DDC0C53BC74000BC3B7 /* AboutWindowController.m in Sources */,
    1906                                 A234D0D20C79FB3600A82373 /* NSMenuAdditions.m in Sources */,
    19071901                                A21282A80CA6C66800EAEE0F /* StatusBarView.m in Sources */,
    19081902                                A257C1820CAD3003004E121C /* PeerTableView.m in Sources */,
  • trunk/macosx/AddWindowController.m

    r7364 r7427  
    2828#import "GroupsController.h"
    2929#import "NSStringAdditions.h"
    30 #import "NSMenuAdditions.h"
    3130#import "NSApplicationAdditions.h"
    3231#import "ExpandedPathToIconTransformer.h"
  • trunk/macosx/Controller.m

    r7426 r7427  
    22842284- (void) menuNeedsUpdate: (NSMenu *) menu
    22852285{
    2286     if (menu == fGroupsSetMenu || menu == fGroupsSetContextMenu)
    2287     {
    2288         for (NSInteger i = [menu numberOfItems]-1; i >= 0; i--)
     2286    if (menu == fGroupsSetMenu || menu == fGroupsSetContextMenu || menu == fGroupFilterMenu)
     2287    {
     2288        const BOOL filter = menu == fGroupFilterMenu;
     2289       
     2290        const NSInteger remaining = filter ? 3 : 0;
     2291        for (NSInteger i = [menu numberOfItems]-1; i >= remaining; i--)
    22892292            [menu removeItemAtIndex: i];
    22902293       
    2291         NSMenu * groupMenu = [[GroupsController groups] groupMenuWithTarget: self action: @selector(setGroup:) isSmall: NO];
    2292         const NSInteger groupMenuCount = [groupMenu numberOfItems];
    2293         for (NSInteger i = 0; i < groupMenuCount; i++)
    2294         {
    2295             NSMenuItem * item = [[groupMenu itemAtIndex: 0] retain];
    2296             [groupMenu removeItemAtIndex: 0];
    2297             [menu addItem: item];
    2298             [item release];
    2299         }
    2300     }
    2301     else if (menu == fGroupFilterMenu)
    2302     {
    2303         for (NSInteger i = [menu numberOfItems]-1; i >= 3; i--)
    2304             [menu removeItemAtIndex: i];
    2305        
    2306         NSMenu * groupMenu = [[GroupsController groups] groupMenuWithTarget: self action: @selector(setGroupFilter:)
    2307                                 isSmall: YES];
     2294        NSMenu * groupMenu;
     2295        if (filter)
     2296            groupMenu = [[GroupsController groups] groupMenuWithTarget: self action: @selector(setGroup:) isSmall: NO];
     2297        else
     2298            groupMenu = [[GroupsController groups] groupMenuWithTarget: self action: @selector(setGroupFilter:) isSmall: YES];
     2299       
    23082300        const NSInteger groupMenuCount = [groupMenu numberOfItems];
    23092301        for (NSInteger i = 0; i < groupMenuCount; i++)
Note: See TracChangeset for help on using the changeset viewer.