Changeset 4056


Ignore:
Timestamp:
Dec 4, 2007, 1:46:27 AM (14 years ago)
Author:
livings124
Message:

get toolbar working in Text-only mode

Location:
trunk/macosx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/ButtonToolbarItem.m

    r4005 r4056  
    3232}
    3333
     34- (NSMenuItem *) menuFormRepresentation
     35{
     36    NSMenuItem * menu = [[NSMenuItem alloc] initWithTitle: [self label] action: [self action] keyEquivalent: @""];
     37    [menu setTarget: [self target]];
     38    [menu setEnabled: [[self target] validateToolbarItem: self]];
     39   
     40    return [menu autorelease];
     41}
     42
    3443@end
  • trunk/macosx/Controller.m

    r4034 r4056  
    25772577   
    25782578    NSButton * button = [[NSButton alloc] initWithFrame: NSZeroRect];
    2579     [item setView: button];
    2580    
    25812579    [button setBezelStyle: NSTexturedRoundedBezelStyle];
    25822580    [button setStringValue: @""];
     2581   
     2582    [item setView: button];
     2583    [button release];
    25832584   
    25842585    NSSize buttonSize = NSMakeSize(36.0, 25.0);
     
    25912592        [item setPaletteLabel: NSLocalizedString(@"Create Torrent File", "Create toolbar item -> palette label")];
    25922593        [item setToolTip: NSLocalizedString(@"Create torrent file", "Create toolbar item -> tooltip")];
    2593         [button setImage: [NSImage imageNamed: @"Create.png"]];
     2594        [item setImage: [NSImage imageNamed: @"Create.png"]];
    25942595        [item setTarget: self];
    25952596        [item setAction: @selector(createFile:)];
     
    26012602        [item setPaletteLabel: NSLocalizedString(@"Open Torrent Files", "Open toolbar item -> palette label")];
    26022603        [item setToolTip: NSLocalizedString(@"Open torrent files", "Open toolbar item -> tooltip")];
    2603         [button setImage: [NSImage imageNamed: @"Open.png"]];
     2604        [item setImage: [NSImage imageNamed: @"Open.png"]];
    26042605        [item setTarget: self];
    26052606        [item setAction: @selector(openShowSheet:)];
     
    26112612        [item setPaletteLabel: NSLocalizedString(@"Remove Selected", "Remove toolbar item -> palette label")];
    26122613        [item setToolTip: NSLocalizedString(@"Remove selected transfers", "Remove toolbar item -> tooltip")];
    2613         [button setImage: [NSImage imageNamed: @"Remove.png"]];
     2614        [item setImage: [NSImage imageNamed: @"Remove.png"]];
    26142615        [item setTarget: self];
    26152616        [item setAction: @selector(removeNoDelete:)];
     
    26202621        [item setPaletteLabel: NSLocalizedString(@"Toggle Inspector", "Inspector toolbar item -> palette label")];
    26212622        [item setToolTip: NSLocalizedString(@"Toggle the torrent inspector", "Inspector toolbar item -> tooltip")];
    2622         [button setImage: [NSImage imageNamed: @"Info.png"]];
     2623        [item setImage: [NSImage imageNamed: @"Info.png"]];
    26232624        [item setTarget: self];
    26242625        [item setAction: @selector(showInfo:)];
     
    26302631        [item setPaletteLabel: [item label]];
    26312632        [item setToolTip: NSLocalizedString(@"Pause all transfers", "Pause All toolbar item -> tooltip")];
    2632         [button setImage: [NSImage imageNamed: @"PauseAll.png"]];
     2633        [item setImage: [NSImage imageNamed: @"PauseAll.png"]];
    26332634        [item setTarget: self];
    26342635        [item setAction: @selector(stopAllTorrents:)];
     
    26392640        [item setPaletteLabel: [item label]];
    26402641        [item setToolTip: NSLocalizedString(@"Resume all transfers", "Resume All toolbar item -> tooltip")];
    2641         [button setImage: [NSImage imageNamed: @"ResumeAll.png"]];
     2642        [item setImage: [NSImage imageNamed: @"ResumeAll.png"]];
    26422643        [item setTarget: self];
    26432644        [item setAction: @selector(resumeAllTorrents:)];
     
    26482649        [item setPaletteLabel: NSLocalizedString(@"Pause Selected", "Pause toolbar item -> palette label")];
    26492650        [item setToolTip: NSLocalizedString(@"Pause selected transfers", "Pause toolbar item -> tooltip")];
    2650         [button setImage: [NSImage imageNamed: @"PauseSelected.png"]];
     2651        [item setImage: [NSImage imageNamed: @"PauseSelected.png"]];
    26512652        [item setTarget: self];
    26522653        [item setAction: @selector(stopSelectedTorrents:)];
     
    26572658        [item setPaletteLabel: NSLocalizedString(@"Resume Selected", "Resume toolbar item -> palette label")];
    26582659        [item setToolTip: NSLocalizedString(@"Resume selected transfers", "Resume toolbar item -> tooltip")];
    2659         [button setImage: [NSImage imageNamed: @"ResumeSelected.png"]];
     2660        [item setImage: [NSImage imageNamed: @"ResumeSelected.png"]];
    26602661        [item setTarget: self];
    26612662        [item setAction: @selector(resumeSelectedTorrents:)];
     
    26662667        [item setPaletteLabel: NSLocalizedString(@"Toggle Filter", "Filter toolbar item -> palette label")];
    26672668        [item setToolTip: NSLocalizedString(@"Toggle the filter bar", "Filter toolbar item -> tooltip")];
    2668         [button setImage: [NSImage imageNamed: @"Filter.png"]];
     2669        [item setImage: [NSImage imageNamed: @"Filter.png"]];
    26692670        [item setTarget: self];
    26702671        [item setAction: @selector(toggleFilterBar:)];
     
    26732674    else
    26742675    {
    2675         [button release];
    26762676        [item release];
    26772677        return nil;
    26782678    }
    2679    
    2680     [button release];
    26812679
    26822680    return [item autorelease];
Note: See TracChangeset for help on using the changeset viewer.