From 091aec4abe0046c22acc9e0f785b7985d0d7327b Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Wed, 17 Jan 2007 06:43:07 +0000 Subject: [PATCH] show accurate number of total files --- .../InfoWindow.nib/keyedobjects.nib | Bin 41130 -> 41143 bytes macosx/InfoWindowController.m | 14 ++++++++------ macosx/Torrent.h | 1 + macosx/Torrent.m | 7 ++++++- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/macosx/English.lproj/InfoWindow.nib/keyedobjects.nib b/macosx/English.lproj/InfoWindow.nib/keyedobjects.nib index 09c18f1d3735c69d5d94b64399b4ae53c2cc7a87..3c59084a39cfe1cba61ad411894eb668616a367c 100644 GIT binary patch delta 4058 zcmV~$2Vm4x0{~!w$}CVoD##uMWR_Wq1u8>ExtSZu<@U&3n%qlr*WSJGUJ?)x0ol_E zQbDF{tWZIq>^)=@YAeW+C9>sb{@=I0ton|!>RT9Hx+kqM3mBm-5DMD*5JIC!=&tMT>K^F+)jiQY)3?&M)pyW$ z(toP&uJ5Jqqwl95tk2aC*N@bHqo1o^pkJ&n(l65&>wnPys9&ewpx>k~)gRZN)SuB` z*8ib@qJOP_XQ*bVVd!q?W$0tbGUOPB8gdQ84PO}YG(*I|8Gu1F#0?3m@=rTMD)y7`v*j`_a%f%$(#ZK590fM`TC zA<~KFL`$L@(Ua&+^dqu}K^ifb$R&mmCc;fXVh*vK*iP&uN{Pe7dEydrg{UO%68DJv z#6QFf;x+NsQqxk$l4@ygX=!O=X>aLd8E!FK+?ISxfn|bahUI(9a?1+KO3MbzR?BJ2 zS<4m6HOn(=9cw*n18bVKv9+ajur=2@-1>!ejCHJaoYi2}BGzfvZ>+Pe^Q;T4i>ynm z-&uEC_gME?_gfEHk6Mpg%dIc1udVNF)odxY4{fz`C?}`;l3slXR0lGDtEcOXib2xt;ul+(G_I{zmR250Hn*!{kx&1bK=)OP(h$ zkypq{vWmP%{*Qb^zNe~FS_)N*s!P?UT2gJO_EZMdh3ZE2q*(U>>geIf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}3_@^ildN1C>l=m@+~ct&CGtidHcwW`$L3ic|3@yb@G^0u@P# zDRCuFA<9H$iZWf9rF^5zRpu)Tl*P(2{se!DKf?`i6WkoP z#Gm7KxC8ElyWnp43)~ZbiTmLJcrYG{hvQLrES`WhSdUGZ!5nsAH}>HG&cb0F!BL!x zWsGqGPsY>mOgsmFi@(F)<3%{J6tBRm@LIe9|AdS17Q7wr!h7)nd>9ww6ZjM^!KJty zU%;2}ReT-a!hhj=_#u9bpW+wz6|TVV@JCXGR427a9a4`pAdN{gl0;gQwxm7jNIH`= z(w$_GUZfA{PX>}qGK`EMqscg;B3fb~<^*AhjW~&i@FYk8fkYxP5+`|tkcngpnNDVr zZ^&FSpDZAY$ujZ-SxwfG4df?MM7EIaWEa^>4v@p7n4BP|$Qg2ul#%n~BDq4Yk(=Z; zxl109zsVEwocu%HkhkOmsif6tO`MbT}PF$I$UqO?A{rE!0Zw)J472PeW9oBF&~b6j6mzI*CrDGw5uZPv_ABx{xlR z%jrtGhOVPO(w}G%-9oq1U34!!Ko8SmdV-#!CA2h+meULL61_^V(_8c}dXGM&kLfG= enpPyLB&sHABtA>jPc%xjO0+9jw5nazFa8gq$|l?Z diff --git a/macosx/InfoWindowController.m b/macosx/InfoWindowController.m index 1fc161800..1b6d78551 100644 --- a/macosx/InfoWindowController.m +++ b/macosx/InfoWindowController.m @@ -95,8 +95,10 @@ NSBrowserCell * browserCell = [[[NSBrowserCell alloc] init] autorelease]; [browserCell setLeaf: YES]; [[fFileOutline tableColumnWithIdentifier: @"Name"] setDataCell: browserCell]; + [fFileOutline setDoubleAction: @selector(revealFile:)]; + //set blank inspector [self updateInfoForTorrents: [NSArray array]]; } @@ -263,13 +265,13 @@ [fFiles release]; fFiles = [[torrent fileList] retain]; - #warning change! - if ([fFiles count] > 1) - [fFileTableStatusField setStringValue: [NSString stringWithFormat: NSLocalizedString(@"%d files", - "Inspector -> Files tab -> bottom text (number of files)"), [fFiles count]]]; + int fileCount = [torrent fileCount]; + if (fileCount != 1) + [fFileTableStatusField setStringValue: [NSString stringWithFormat: NSLocalizedString(@"%d files total", + "Inspector -> Files tab -> bottom text (number of files)"), fileCount]]; else - [fFileTableStatusField setStringValue: [NSString stringWithFormat: NSLocalizedString(@"%d file", - "Inspector -> Files tab -> bottom text (number of files)"), [fFiles count]]]; + [fFileTableStatusField setStringValue: NSLocalizedString(@"1 file total", + "Inspector -> Files tab -> bottom text (number of files)")]; } //update stats and settings diff --git a/macosx/Torrent.h b/macosx/Torrent.h index 1e2deca3a..1f75416e2 100644 --- a/macosx/Torrent.h +++ b/macosx/Torrent.h @@ -180,6 +180,7 @@ - (void) setOrderValue: (int) orderValue; - (NSArray *) fileList; +- (int) fileCount; - (NSDate *) date; - (NSNumber *) stateSortKey; diff --git a/macosx/Torrent.m b/macosx/Torrent.m index 605f256d1..eb152cb6c 100644 --- a/macosx/Torrent.m +++ b/macosx/Torrent.m @@ -1066,7 +1066,7 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80 - (NSArray *) fileList { - int count = fInfo->fileCount, i; + int count = [self fileCount], i; tr_file_t file; NSMutableArray * files = [NSMutableArray array]; @@ -1082,6 +1082,11 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80 return files; } +- (int) fileCount +{ + return fInfo->fileCount; +} + - (NSDate *) date { return fDate;