don't allow comment and creator fields to be selected when empty
This commit is contained in:
parent
e9278c4d2f
commit
9453048522
|
@ -320,7 +320,7 @@
|
||||||
4DFBC2DD09C0970D00D5C571 /* Torrent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Torrent.h; path = macosx/Torrent.h; sourceTree = "<group>"; };
|
4DFBC2DD09C0970D00D5C571 /* Torrent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Torrent.h; path = macosx/Torrent.h; sourceTree = "<group>"; };
|
||||||
4DFBC2DE09C0970D00D5C571 /* Torrent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Torrent.m; path = macosx/Torrent.m; sourceTree = "<group>"; };
|
4DFBC2DE09C0970D00D5C571 /* Torrent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Torrent.m; path = macosx/Torrent.m; sourceTree = "<group>"; };
|
||||||
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; name = Info.plist; path = macosx/Info.plist; sourceTree = "<group>"; };
|
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; name = Info.plist; path = macosx/Info.plist; sourceTree = "<group>"; };
|
||||||
8D1107320486CEB800E47090 /* Transmission.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = Transmission.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
8D1107320486CEB800E47090 /* Transmission.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Transmission.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
A200B8390A2263BA007BBB1E /* InfoWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InfoWindowController.h; path = macosx/InfoWindowController.h; sourceTree = "<group>"; };
|
A200B8390A2263BA007BBB1E /* InfoWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InfoWindowController.h; path = macosx/InfoWindowController.h; sourceTree = "<group>"; };
|
||||||
A200B83A0A2263BA007BBB1E /* InfoWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = InfoWindowController.m; path = macosx/InfoWindowController.m; sourceTree = "<group>"; };
|
A200B83A0A2263BA007BBB1E /* InfoWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = InfoWindowController.m; path = macosx/InfoWindowController.m; sourceTree = "<group>"; };
|
||||||
A200B9630A227FD0007BBB1E /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = macosx/English.lproj/InfoWindow.nib; sourceTree = "<group>"; };
|
A200B9630A227FD0007BBB1E /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = macosx/English.lproj/InfoWindow.nib; sourceTree = "<group>"; };
|
||||||
|
|
|
@ -234,8 +234,7 @@
|
||||||
[fNameField setToolTip: name];
|
[fNameField setToolTip: name];
|
||||||
[fSizeField setStringValue: [NSString stringForFileSize: [torrent size]]];
|
[fSizeField setStringValue: [NSString stringForFileSize: [torrent size]]];
|
||||||
|
|
||||||
NSString * hashString = [torrent hashString],
|
NSString * hashString = [torrent hashString];
|
||||||
* commentString = [torrent comment];
|
|
||||||
[fPiecesField setStringValue: [NSString stringWithFormat: @"%d, %@", [torrent pieceCount],
|
[fPiecesField setStringValue: [NSString stringWithFormat: @"%d, %@", [torrent pieceCount],
|
||||||
[NSString stringForFileSize: [torrent pieceSize]]]];
|
[NSString stringForFileSize: [torrent pieceSize]]]];
|
||||||
[fHashField setStringValue: hashString];
|
[fHashField setStringValue: hashString];
|
||||||
|
@ -243,9 +242,12 @@
|
||||||
[fSecureField setStringValue: [torrent privateTorrent]
|
[fSecureField setStringValue: [torrent privateTorrent]
|
||||||
? NSLocalizedString(@"Private Torrent, PEX disabled", "Inspector -> is private torrent")
|
? NSLocalizedString(@"Private Torrent, PEX disabled", "Inspector -> is private torrent")
|
||||||
: NSLocalizedString(@"Public Torrent", "Inspector -> is not private torrent")];
|
: NSLocalizedString(@"Public Torrent", "Inspector -> is not private torrent")];
|
||||||
|
|
||||||
|
NSString * commentString = [torrent comment];
|
||||||
[fCommentView setString: commentString];
|
[fCommentView setString: commentString];
|
||||||
|
|
||||||
[fCreatorField setStringValue: [torrent creator]];
|
NSString * creatorString = [torrent creator];
|
||||||
|
[fCreatorField setStringValue: creatorString];
|
||||||
[fDateCreatedField setObjectValue: [torrent dateCreated]];
|
[fDateCreatedField setObjectValue: [torrent dateCreated]];
|
||||||
|
|
||||||
BOOL publicTorrent = [torrent publicTorrent];
|
BOOL publicTorrent = [torrent publicTorrent];
|
||||||
|
@ -266,8 +268,8 @@
|
||||||
//allow these fields to be selected
|
//allow these fields to be selected
|
||||||
[fTrackerField setSelectable: YES];
|
[fTrackerField setSelectable: YES];
|
||||||
[fHashField setSelectable: YES];
|
[fHashField setSelectable: YES];
|
||||||
[fCommentView setSelectable: YES];
|
[fCommentView setSelectable: ![commentString isEqualToString: @""]];
|
||||||
[fCreatorField setSelectable: YES];
|
[fCreatorField setSelectable: ![creatorString isEqualToString: @""]];
|
||||||
[fTorrentLocationField setSelectable: YES];
|
[fTorrentLocationField setSelectable: YES];
|
||||||
[fDataLocationField setSelectable: YES];
|
[fDataLocationField setSelectable: YES];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue