Changeset 4005


Ignore:
Timestamp:
Nov 29, 2007, 1:05:11 AM (15 years ago)
Author:
livings124
Message:

make toolbar buttons leopard-like; icons are placeholders

Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Transmission.xcodeproj/project.pbxproj

    r3922 r4005  
    135135                A2BE9C530C1E4AF7002D16E6 /* makemeta.h in Headers */ = {isa = PBXBuildFile; fileRef = A2BE9C4F0C1E4ADA002D16E6 /* makemeta.h */; };
    136136                A2BF07910B066E0800757C92 /* SpeedLimitToTurtleIconTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = A2BF078F0B066E0800757C92 /* SpeedLimitToTurtleIconTransformer.m */; };
     137                A2C89D600CFCBF57004CC2BC /* ButtonToolbarItem.m in Sources */ = {isa = PBXBuildFile; fileRef = A2C89D5F0CFCBF57004CC2BC /* ButtonToolbarItem.m */; };
    137138                A2D0E0490A54A97C003C72CF /* Bandwidth.png in Resources */ = {isa = PBXBuildFile; fileRef = A2D0E0480A54A97C003C72CF /* Bandwidth.png */; };
    138139                A2DA362A0CBC674900C2ED41 /* InfoActivity.png in Resources */ = {isa = PBXBuildFile; fileRef = A2DA36270CBC674900C2ED41 /* InfoActivity.png */; };
     
    140141                A2DA362C0CBC674900C2ED41 /* InfoPeers.png in Resources */ = {isa = PBXBuildFile; fileRef = A2DA36290CBC674900C2ED41 /* InfoPeers.png */; };
    141142                A2DF37070C220D03006523C1 /* CreatorWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = A2DF37050C220D03006523C1 /* CreatorWindowController.m */; };
     143                A2E165BC0CFE44250047F575 /* QuittingWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = A2E165BB0CFE44250047F575 /* QuittingWindowController.m */; };
     144                A2E165C80CFE45AF0047F575 /* QuittingWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = A2E165C70CFE45AF0047F575 /* QuittingWindow.xib */; };
    142145                A2E23AC60CB5E1930002BB25 /* InfoTabButtonCell.m in Sources */ = {isa = PBXBuildFile; fileRef = A2E23AC40CB5E1930002BB25 /* InfoTabButtonCell.m */; };
    143146                A2E9AA760C249AF400085DCF /* Create.png in Resources */ = {isa = PBXBuildFile; fileRef = A2E9AA750C249AF400085DCF /* Create.png */; };
     
    502505                A2BF078E0B066E0800757C92 /* SpeedLimitToTurtleIconTransformer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SpeedLimitToTurtleIconTransformer.h; path = macosx/SpeedLimitToTurtleIconTransformer.h; sourceTree = "<group>"; };
    503506                A2BF078F0B066E0800757C92 /* SpeedLimitToTurtleIconTransformer.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = SpeedLimitToTurtleIconTransformer.m; path = macosx/SpeedLimitToTurtleIconTransformer.m; sourceTree = "<group>"; };
     507                A2C89D5E0CFCBF57004CC2BC /* ButtonToolbarItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ButtonToolbarItem.h; path = macosx/ButtonToolbarItem.h; sourceTree = "<group>"; };
     508                A2C89D5F0CFCBF57004CC2BC /* ButtonToolbarItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ButtonToolbarItem.m; path = macosx/ButtonToolbarItem.m; sourceTree = "<group>"; };
    504509                A2D0E0480A54A97C003C72CF /* Bandwidth.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Bandwidth.png; path = macosx/Images/Bandwidth.png; sourceTree = "<group>"; };
    505510                A2D688850CB4984B009BEC3A /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = macosx/English.lproj/MainMenu.nib; sourceTree = "<group>"; };
     
    515520                A2DF37040C220D03006523C1 /* CreatorWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CreatorWindowController.h; path = macosx/CreatorWindowController.h; sourceTree = "<group>"; };
    516521                A2DF37050C220D03006523C1 /* CreatorWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CreatorWindowController.m; path = macosx/CreatorWindowController.m; sourceTree = "<group>"; };
     522                A2E165BA0CFE44250047F575 /* QuittingWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QuittingWindowController.h; path = macosx/QuittingWindowController.h; sourceTree = "<group>"; };
     523                A2E165BB0CFE44250047F575 /* QuittingWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = QuittingWindowController.m; path = macosx/QuittingWindowController.m; sourceTree = "<group>"; };
     524                A2E165C70CFE45AF0047F575 /* QuittingWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = QuittingWindow.xib; path = macosx/QuittingWindow.xib; sourceTree = "<group>"; };
    517525                A2E23AC30CB5E1930002BB25 /* InfoTabButtonCell.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = InfoTabButtonCell.h; path = macosx/InfoTabButtonCell.h; sourceTree = "<group>"; };
    518526                A2E23AC40CB5E1930002BB25 /* InfoTabButtonCell.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = InfoTabButtonCell.m; path = macosx/InfoTabButtonCell.m; sourceTree = "<group>"; };
     
    751759                                A25E74470AF5089E006F11AE /* ExpandedPathToIconTransformer.h */,
    752760                                A25E74460AF5089E006F11AE /* ExpandedPathToIconTransformer.m */,
     761                                A2C89D5E0CFCBF57004CC2BC /* ButtonToolbarItem.h */,
     762                                A2C89D5F0CFCBF57004CC2BC /* ButtonToolbarItem.m */,
    753763                                4DE5CCA50980735700BE280E /* Badger.h */,
    754764                                4DE5CCA60980735700BE280E /* Badger.m */,
     
    763773                                A2085DD90C53BC74000BC3B7 /* AboutWindowController.h */,
    764774                                A2085DDA0C53BC74000BC3B7 /* AboutWindowController.m */,
     775                                A2E165BA0CFE44250047F575 /* QuittingWindowController.h */,
     776                                A2E165BB0CFE44250047F575 /* QuittingWindowController.m */,
    765777                                A234D0D40C79FB6000A82373 /* Additions */,
    766778                                E1B6FBF80C0D719B0015FE4D /* Info Window */,
     
    828840                                A25892750CF1FCE800CCCDDF /* StatsWindow.xib */,
    829841                                A2A6E39F0CA7E4C900F10FEF /* AboutWindow.nib */,
     842                                A2E165C70CFE45AF0047F575 /* QuittingWindow.xib */,
    830843                                A20B6FA40C4D97840034AB1D /* PriorityNone.png */,
    831844                                A20B6F8B0C4D90980034AB1D /* PriorityMixed.png */,
     
    14931506                                A2F151260CD438DE001F3B0E /* InfoTabBackBlue.png in Resources */,
    14941507                                A25892770CF1FCE800CCCDDF /* StatsWindow.xib in Resources */,
     1508                                A2E165C80CFE45AF0047F575 /* QuittingWindow.xib in Resources */,
    14951509                        );
    14961510                        runOnlyForDeploymentPostprocessing = 0;
     
    16261640                                A2ED7D8F0CEF431B00970975 /* FilterButton.m in Sources */,
    16271641                                A25892640CF1F7E800CCCDDF /* StatsWindowController.m in Sources */,
     1642                                A2C89D600CFCBF57004CC2BC /* ButtonToolbarItem.m in Sources */,
     1643                                A2E165BC0CFE44250047F575 /* QuittingWindowController.m in Sources */,
    16281644                        );
    16291645                        runOnlyForDeploymentPostprocessing = 0;
  • trunk/macosx/Controller.m

    r3950 r4005  
    3232#import "StatsWindowController.h"
    3333#import "AboutWindowController.h"
     34#import "ButtonToolbarItem.h"
    3435#import "NSApplicationAdditions.h"
    3536#import "NSStringAdditions.h"
     
    25652566- (void) doNothing: (id) sender {}
    25662567
    2567 - (NSToolbarItem *) toolbar: (NSToolbar *) t itemForItemIdentifier: (NSString *) ident willBeInsertedIntoToolbar: (BOOL) flag
    2568 {
    2569     NSToolbarItem * item = [[NSToolbarItem alloc] initWithItemIdentifier: ident];
    2570 
     2568- (NSToolbarItem *) toolbar: (NSToolbar *) toolbar itemForItemIdentifier: (NSString *) ident willBeInsertedIntoToolbar: (BOOL) flag
     2569{
     2570    ButtonToolbarItem * item = [[ButtonToolbarItem alloc] initWithItemIdentifier: ident];
     2571   
     2572    NSButton * button = [[NSButton alloc] initWithFrame: NSZeroRect];
     2573    [item setView: button];
     2574   
     2575    [button setBezelStyle: NSTexturedRoundedBezelStyle];
     2576    [button setStringValue: @""];
     2577   
     2578    NSSize buttonSize = NSMakeSize(35.0, 25.0);
     2579    [item setMinSize: buttonSize];
     2580    [item setMaxSize: buttonSize];
     2581   
     2582    NSImage * image;
     2583   
    25712584    if ([ident isEqualToString: TOOLBAR_CREATE])
    25722585    {
     
    25742587        [item setPaletteLabel: NSLocalizedString(@"Create Torrent File", "Create toolbar item -> palette label")];
    25752588        [item setToolTip: NSLocalizedString(@"Create torrent file", "Create toolbar item -> tooltip")];
    2576         [item setImage: [NSImage imageNamed: @"Create.png"]];
     2589        image = [NSImage imageNamed: @"Create.png"];
    25772590        [item setTarget: self];
    25782591        [item setAction: @selector(createFile:)];
     
    25842597        [item setPaletteLabel: NSLocalizedString(@"Open Torrent Files", "Open toolbar item -> palette label")];
    25852598        [item setToolTip: NSLocalizedString(@"Open torrent files", "Open toolbar item -> tooltip")];
    2586         [item setImage: [NSImage imageNamed: @"Open.png"]];
     2599        image = [NSImage imageNamed: @"Open.png"];
    25872600        [item setTarget: self];
    25882601        [item setAction: @selector(openShowSheet:)];
     
    25942607        [item setPaletteLabel: NSLocalizedString(@"Remove Selected", "Remove toolbar item -> palette label")];
    25952608        [item setToolTip: NSLocalizedString(@"Remove selected transfers", "Remove toolbar item -> tooltip")];
    2596         [item setImage: [NSImage imageNamed: @"Remove.png"]];
     2609        image = [NSImage imageNamed: @"Remove.png"];
    25972610        [item setTarget: self];
    25982611        [item setAction: @selector(removeNoDelete:)];
     
    26032616        [item setPaletteLabel: NSLocalizedString(@"Toggle Inspector", "Inspector toolbar item -> palette label")];
    26042617        [item setToolTip: NSLocalizedString(@"Toggle the torrent inspector", "Inspector toolbar item -> tooltip")];
    2605         [item setImage: [NSImage imageNamed: @"Info.png"]];
     2618        image = [NSImage imageNamed: @"Info.png"];
    26062619        [item setTarget: self];
    26072620        [item setAction: @selector(showInfo:)];
     
    26132626        [item setPaletteLabel: [item label]];
    26142627        [item setToolTip: NSLocalizedString(@"Pause all transfers", "Pause All toolbar item -> tooltip")];
    2615         [item setImage: [NSImage imageNamed: @"PauseAll.png"]];
     2628        image = [NSImage imageNamed: @"PauseAll.png"];
    26162629        [item setTarget: self];
    26172630        [item setAction: @selector(stopAllTorrents:)];
     
    26222635        [item setPaletteLabel: [item label]];
    26232636        [item setToolTip: NSLocalizedString(@"Resume all transfers", "Resume All toolbar item -> tooltip")];
    2624         [item setImage: [NSImage imageNamed: @"ResumeAll.png"]];
     2637        image = [NSImage imageNamed: @"ResumeAll.png"];
    26252638        [item setTarget: self];
    26262639        [item setAction: @selector(resumeAllTorrents:)];
     
    26312644        [item setPaletteLabel: NSLocalizedString(@"Pause Selected", "Pause toolbar item -> palette label")];
    26322645        [item setToolTip: NSLocalizedString(@"Pause selected transfers", "Pause toolbar item -> tooltip")];
    2633         [item setImage: [NSImage imageNamed: @"PauseSelected.png"]];
     2646        image = [NSImage imageNamed: @"PauseSelected.png"];
    26342647        [item setTarget: self];
    26352648        [item setAction: @selector(stopSelectedTorrents:)];
     
    26402653        [item setPaletteLabel: NSLocalizedString(@"Resume Selected", "Resume toolbar item -> palette label")];
    26412654        [item setToolTip: NSLocalizedString(@"Resume selected transfers", "Resume toolbar item -> tooltip")];
    2642         [item setImage: [NSImage imageNamed: @"ResumeSelected.png"]];
     2655        image = [NSImage imageNamed: @"ResumeSelected.png"];
    26432656        [item setTarget: self];
    26442657        [item setAction: @selector(resumeSelectedTorrents:)];
     
    26492662        [item setPaletteLabel: NSLocalizedString(@"Toggle Filter", "Filter toolbar item -> palette label")];
    26502663        [item setToolTip: NSLocalizedString(@"Toggle the filter bar", "Filter toolbar item -> tooltip")];
    2651         [item setImage: [NSImage imageNamed: @"Filter.png"]];
     2664        image = [NSImage imageNamed: @"Filter.png"];
    26522665        [item setTarget: self];
    26532666        [item setAction: @selector(toggleFilterBar:)];
     
    26562669    else
    26572670    {
     2671        [button release];
    26582672        [item release];
    26592673        return nil;
    26602674    }
     2675   
     2676    [image setScalesWhenResized: YES];
     2677    [image setSize: NSMakeSize(16.0, 16.0)];
     2678    [button setImage: image];
     2679   
     2680    [button release];
    26612681
    26622682    return [item autorelease];
    26632683}
    26642684
    2665 - (NSArray *) toolbarAllowedItemIdentifiers: (NSToolbar *) t
     2685- (NSArray *) toolbarAllowedItemIdentifiers: (NSToolbar *) toolbar
    26662686{
    26672687    return [NSArray arrayWithObjects:
     
    26752695}
    26762696
    2677 - (NSArray *) toolbarDefaultItemIdentifiers: (NSToolbar *) t
     2697- (NSArray *) toolbarDefaultItemIdentifiers: (NSToolbar *) toolbar
    26782698{
    26792699    return [NSArray arrayWithObjects:
  • trunk/macosx/InfoWindowController.m

    r4003 r4005  
    865865        int status = [[peer objectForKey: @"Status"] intValue];
    866866        if (status & TR_PEER_STATUS_HANDSHAKE)
    867             [components addObject: NSLocalizedString(@"Handshaking", "peer -> status")];
     867            [components addObject: NSLocalizedString(@"Handshaking", "Inspector -> peer -> status")];
    868868        else
    869869        {
    870870            NSString * firstString;
    871871            if (status & TR_PEER_STATUS_CLIENT_IS_SENDING)
    872                 firstString = NSLocalizedString(@"Uploading to peer", "peer -> status");
     872                firstString = NSLocalizedString(@"Uploading to peer", "Inspector -> peer -> status");
    873873            else if (status & TR_PEER_STATUS_PEER_IS_INTERESTED)
    874                 firstString = NSLocalizedString(@"Peer wants our data", "peer -> status");
     874                firstString = NSLocalizedString(@"Peer wants our data", "Inspector -> peer -> status");
    875875            else if (status & TR_PEER_STATUS_PEER_IS_CHOKED)
    876                 firstString = NSLocalizedString(@"Refusing to send data to peer", "peer -> status");
     876                firstString = NSLocalizedString(@"Refusing to send data to peer", "Inspector -> peer -> status");
    877877            else
    878878                firstString = @"";
     
    880880            NSString * secondString;
    881881            if (status & TR_PEER_STATUS_PEER_IS_SENDING)
    882                 secondString = NSLocalizedString(@"Downloading from peer", "peer -> status");
     882                secondString = NSLocalizedString(@"Downloading from peer", "Inspector -> peer -> status");
    883883            else if (status & TR_PEER_STATUS_CLIENT_SENT_REQUEST)
    884                 secondString = NSLocalizedString(@"Requesting data from peer", "peer -> status");
     884                secondString = NSLocalizedString(@"Requesting data from peer", "Inspector -> peer -> status");
    885885            else if (status & TR_PEER_STATUS_CLIENT_IS_INTERESTED)
    886                 secondString = NSLocalizedString(@"Waiting to request data from peer", "peer -> status");
     886                secondString = NSLocalizedString(@"Waiting to request data from peer", "Inspector -> peer -> status");
    887887            else if (status & TR_PEER_STATUS_CLIENT_IS_CHOKED)
    888                 secondString = NSLocalizedString(@"Peer will not send us data", "peer -> status");
     888                secondString = NSLocalizedString(@"Peer will not send us data", "Inspector -> peer -> status");
    889889            else
    890890                secondString = @"";
Note: See TracChangeset for help on using the changeset viewer.