Changeset 2563


Ignore:
Timestamp:
Jul 31, 2007, 12:45:39 AM (14 years ago)
Author:
livings124
Message:

don't allow comment and creator fields to be selected when empty

Location:
trunk
Files:
2 edited

Legend:

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

    r2562 r2563  
    321321                4DFBC2DE09C0970D00D5C571 /* Torrent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Torrent.m; path = macosx/Torrent.m; sourceTree = "<group>"; };
    322322                8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; name = Info.plist; path = macosx/Info.plist; sourceTree = "<group>"; };
    323                 8D1107320486CEB800E47090 /* Transmission.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = Transmission.app; sourceTree = BUILT_PRODUCTS_DIR; };
     323                8D1107320486CEB800E47090 /* Transmission.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Transmission.app; sourceTree = BUILT_PRODUCTS_DIR; };
    324324                A200B8390A2263BA007BBB1E /* InfoWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InfoWindowController.h; path = macosx/InfoWindowController.h; sourceTree = "<group>"; };
    325325                A200B83A0A2263BA007BBB1E /* InfoWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = InfoWindowController.m; path = macosx/InfoWindowController.m; sourceTree = "<group>"; };
  • trunk/macosx/InfoWindowController.m

    r2560 r2563  
    235235        [fSizeField setStringValue: [NSString stringForFileSize: [torrent size]]];
    236236       
    237         NSString * hashString = [torrent hashString],
    238                 * commentString = [torrent comment];
     237        NSString * hashString = [torrent hashString];
    239238        [fPiecesField setStringValue: [NSString stringWithFormat: @"%d, %@", [torrent pieceCount],
    240239                                        [NSString stringForFileSize: [torrent pieceSize]]]];
     
    244243                        ? NSLocalizedString(@"Private Torrent, PEX disabled", "Inspector -> is private torrent")
    245244                        : NSLocalizedString(@"Public Torrent", "Inspector -> is not private torrent")];
     245       
     246        NSString * commentString = [torrent comment];
    246247        [fCommentView setString: commentString];
    247248       
    248         [fCreatorField setStringValue: [torrent creator]];
     249        NSString * creatorString = [torrent creator];
     250        [fCreatorField setStringValue: creatorString];
    249251        [fDateCreatedField setObjectValue: [torrent dateCreated]];
    250252       
     
    267269        [fTrackerField setSelectable: YES];
    268270        [fHashField setSelectable: YES];
    269         [fCommentView setSelectable: YES];
    270         [fCreatorField setSelectable: YES];
     271        [fCommentView setSelectable: ![commentString isEqualToString: @""]];
     272        [fCreatorField setSelectable: ![creatorString isEqualToString: @""]];
    271273        [fTorrentLocationField setSelectable: YES];
    272274        [fDataLocationField setSelectable: YES];
Note: See TracChangeset for help on using the changeset viewer.