Changeset 5149 for trunk/macosx/AddWindowController.m
- Timestamp:
- Feb 27, 2008, 7:34:55 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/AddWindowController.m
r5030 r5149 70 70 - (void) awakeFromNib 71 71 { 72 [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(updateStatusField:) 73 name: @"TorrentFileCheckChange" object: fTorrent]; 74 72 75 [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(updateGroupMenu:) 73 76 name: @"UpdateGroups" object: nil]; … … 84 87 [icon release]; 85 88 86 NSString * statusString = [NSString stringForFileSize: [fTorrent size]]; 87 if ([fTorrent folder]) 88 { 89 NSString * fileString; 90 int count = [fTorrent fileCount]; 91 if (count != 1) 92 fileString = [NSString stringWithFormat: NSLocalizedString(@"%d Files, ", "Add torrent -> info"), count]; 93 else 94 fileString = NSLocalizedString(@"1 File, ", "Add torrent -> info"); 95 statusString = [fileString stringByAppendingString: statusString]; 96 } 97 [fStatusField setStringValue: statusString]; 89 [self updateStatusField: nil]; 98 90 99 91 [self setGroupsMenu]; … … 213 205 } 214 206 207 - (void) updateStatusField: (NSNotification *) notification 208 { 209 NSString * statusString = [NSString stringForFileSize: [fTorrent size]]; 210 if ([fTorrent folder]) 211 statusString = [statusString stringByAppendingFormat: NSLocalizedString(@" (%@ selected)", "Add torrent -> info"), 212 [NSString stringForFileSize: [fTorrent totalSizeSelected]]]; 213 214 if ([fTorrent folder]) 215 { 216 NSString * fileString; 217 int count = [fTorrent fileCount]; 218 if (count != 1) 219 fileString = [NSString stringWithFormat: NSLocalizedString(@"%d Files, ", "Add torrent -> info"), count]; 220 else 221 fileString = NSLocalizedString(@"1 File, ", "Add torrent -> info"); 222 statusString = [fileString stringByAppendingString: statusString]; 223 } 224 225 [fStatusField setStringValue: statusString]; 226 } 227 215 228 - (void) updateGroupMenu: (NSNotification *) notification 216 229 {
Note: See TracChangeset
for help on using the changeset viewer.