Changeset 1304
- Timestamp:
- Dec 31, 2006, 9:38:35 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/clients.c
r1301 r1304 79 79 else if( !memcmp( &id[1], "BOW", 3 ) ) 80 80 { 81 asprintf( &ret, "Bits on Wheels (%c%c )",82 id[ 5], id[6] );81 asprintf( &ret, "Bits on Wheels (%c%c%c)", 82 id[4], id[5], id[6] ); 83 83 } 84 84 else if( !memcmp( &id[1], "BR", 2 ) ) -
trunk/macosx/English.lproj/PrefsWindow.nib/classes.nib
r1295 r1304 7 7 ACTIONS = { 8 8 applySpeedSettings = id; 9 applyTorrent SpeedSetting = id;9 applyTorrentLimitSetting = id; 10 10 folderSheetShow = id; 11 11 helpForNetwork = id; … … 21 21 setQueueNumber = id; 22 22 setSound = id; 23 setSpeedLimit = id; 24 setTorrentLimit = id; 23 25 setUpdate = id; 24 26 }; … … 30 32 fDownloadField = NSTextField; 31 33 fDownloadSoundPopUp = NSPopUpButton; 34 fDownloadTorrentField = NSTextField; 32 35 fFolderPopUp = NSPopUpButton; 33 36 fGeneralView = NSView; … … 38 41 fNatStatusImage = NSImageView; 39 42 fNetworkView = NSView; 43 fPortField = NSTextField; 40 44 fPortStatusField = NSTextField; 41 45 fPortStatusImage = NSImageView; … … 48 52 fUploadCheck = NSButton; 49 53 fUploadField = NSTextField; 54 fUploadTorrentField = NSTextField; 50 55 }; 51 56 SUPERCLASS = NSWindowController; -
trunk/macosx/English.lproj/PrefsWindow.nib/info.nib
r1298 r1304 8 8 <dict> 9 9 <key>153</key> 10 <string> 119 428571 335 0 0 1152 842 </string>10 <string>290 411 571 335 0 0 1152 842 </string> 11 11 <key>28</key> 12 <string> 99 386571 290 0 0 1152 842 </string>12 <string>290 434 571 290 0 0 1152 842 </string> 13 13 <key>41</key> 14 14 <string>290 426 571 305 0 0 1152 842 </string> 15 15 <key>66</key> 16 <string> 139 501571 144 0 0 1152 842 </string>16 <string>290 507 571 144 0 0 1152 842 </string> 17 17 </dict> 18 18 <key>IBFramework Version</key> -
trunk/macosx/PrefsController.h
r1295 r1304 46 46 47 47 IBOutlet NSTextField * fUploadField, * fDownloadField, 48 * fUploadTorrentField, * fDownloadTorrentField, 48 49 * fSpeedLimitUploadField, * fSpeedLimitDownloadField; 49 50 IBOutlet NSButton * fUploadCheck, * fDownloadCheck; 50 51 51 IBOutlet NSTextField * fNatStatusField, 52 * fPortStatusField; 52 IBOutlet NSTextField * fPortField, * fNatStatusField, * fPortStatusField; 53 53 IBOutlet NSButton * fNatCheck; 54 54 IBOutlet NSImageView * fNatStatusImage, * fPortStatusImage; … … 77 77 - (void) updateNatStatus; 78 78 79 - (void) applySpeedSettings: (id) sender; 80 81 - (void) applyTorrentLimitSetting: (id) sender; 82 - (void) setTorrentLimit: (id) sender; 83 84 - (void) setSpeedLimit: (id) sender; 79 85 - (void) setAutoSpeedLimit: (id) sender; 80 81 - (void) applySpeedSettings: (id) sender;82 - (void) applyTorrentSpeedSetting: (id) sender;83 86 84 87 - (void) setAutoImport: (id) sender; -
trunk/macosx/PrefsController.m
r1295 r1304 134 134 [fFolderPopUp selectItemAtIndex: DOWNLOAD_ASK]; 135 135 136 //set torrent limits 137 [fUploadTorrentField setIntValue: [fDefaults integerForKey: @"UploadLimitTorrent"]]; 138 [fDownloadTorrentField setIntValue: [fDefaults integerForKey: @"DownloadLimitTorrent"]]; 139 140 //set speed limit 141 [fSpeedLimitUploadField setIntValue: [fDefaults integerForKey: @"SpeedLimitUploadLimit"]]; 142 [fSpeedLimitDownloadField setIntValue: [fDefaults integerForKey: @"SpeedLimitDownloadLimit"]]; 143 144 //set port 145 [fPortField setIntValue: [fDefaults integerForKey: @"BindPort"]]; 146 136 147 [self updatePortStatus]; 137 148 … … 221 232 - (void) setPort: (id) sender 222 233 { 234 int port = [sender intValue]; 235 if (![[sender stringValue] isEqualToString: [NSString stringWithFormat: @"%d", port]]) 236 { 237 NSBeep(); 238 [sender setIntValue: [fDefaults integerForKey: @"BindPort"]]; 239 return; 240 } 241 242 [fDefaults setInteger: port forKey: @"BindPort"]; 243 223 244 tr_setBindPort(fHandle, [fDefaults integerForKey: @"BindPort"]); 224 245 [self updateNatStatus]; … … 314 335 } 315 336 316 - (void) applyTorrent SpeedSetting: (id) sender337 - (void) applyTorrentLimitSetting: (id) sender 317 338 { 318 339 [[NSNotificationCenter defaultCenter] postNotificationName: @"UpdateSpeedSetting" object: self]; 340 } 341 342 - (void) setTorrentLimit: (id) sender 343 { 344 BOOL upload = sender == fUploadTorrentField; 345 346 int limit = [sender intValue]; 347 if (![[sender stringValue] isEqualToString: [NSString stringWithFormat: @"%d", limit]]) 348 { 349 NSBeep(); 350 [sender setIntValue: [fDefaults integerForKey: upload ? @"UploadLimitTorrent" : @"DownloadLimitTorrent"]]; 351 return; 352 } 353 354 [fDefaults setInteger: limit forKey: upload ? @"UploadLimitTorrent" : @"DownloadLimitTorrent"]; 355 356 [self applyTorrentLimitSetting: self]; 357 } 358 359 - (void) setSpeedLimit: (id) sender 360 { 361 BOOL upload = sender == fSpeedLimitUploadField; 362 363 int limit = [sender intValue]; 364 if (![[sender stringValue] isEqualToString: [NSString stringWithFormat: @"%d", limit]]) 365 { 366 NSBeep(); 367 [sender setIntValue: [fDefaults integerForKey: upload ? @"SpeedLimitUploadLimit" : @"SpeedLimitDownloadLimit"]]; 368 return; 369 } 370 371 [fDefaults setInteger: limit forKey: upload ? @"SpeedLimitUploadLimit" : @"SpeedLimitDownloadLimit"]; 372 373 [self applySpeedSettings: self]; 319 374 } 320 375
Note: See TracChangeset
for help on using the changeset viewer.