Ignore:
Timestamp:
Oct 27, 2007, 6:40:43 PM (15 years ago)
Author:
livings124
Message:

show the multiple document icon on Leopard when multiple files selected

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/InfoWindowController.m

    r3597 r3601  
    2525#import "InfoWindowController.h"
    2626#import "InfoTabButtonCell.h"
     27#import "NSApplicationAdditions.h"
    2728#import "NSStringAdditions.h"
    2829
     
    7778- (void) awakeFromNib
    7879{
    79     //get images
    80     fAppIcon = [NSImage imageNamed: @"NSApplicationIcon"];
    81    
    8280    //window location and size
    8381    NSPanel * window = (NSPanel *)[self window];
     
    184182        if (numberSelected > 0)
    185183        {
     184            [fImageView setImage: [NSImage imageNamed: [NSApp isOnLeopardOrBetter]
     185                                    ? NSImageNameMultipleDocuments : @"NSApplicationIcon"]];
     186           
    186187            [fNameField setStringValue: [NSString stringWithFormat: NSLocalizedString(@"%d Torrents Selected",
    187188                                            "Inspector -> above tabs -> selected torrents"), numberSelected]];
     
    198199        else
    199200        {
     201            [fImageView setImage: [NSImage imageNamed: @"NSApplicationIcon"]];
     202           
    200203            [fNameField setStringValue: NSLocalizedString(@"No Torrents Selected", "Inspector -> above tabs -> selected torrents")];
    201204            [fSizeField setStringValue: @""];
     
    231234        [fFileOutline setTorrent: nil];
    232235       
    233         [fImageView setImage: fAppIcon];
    234        
    235236        [fNameField setToolTip: nil];
    236237
     
    658659       
    659660        if ([ident isEqualToString: @"Encryption"])
    660         {
    661             if ([[peer objectForKey: @"Encryption"] boolValue])
    662             {
    663                 if (!fLockImage)
    664                     fLockImage = [NSImage imageNamed: @"Lock.tiff"];
    665                 return fLockImage;
    666             }
    667             else
    668                 return nil;
    669         }
     661            return [[peer objectForKey: @"Encryption"] boolValue] ? [NSImage imageNamed: @"Lock.tiff"] : nil;
    670662        else if ([ident isEqualToString: @"Client"])
    671663            return [peer objectForKey: @"Client"];
Note: See TracChangeset for help on using the changeset viewer.