1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-26 01:27:28 +00:00

preference to not give warning about remaining space

This commit is contained in:
Mitchell Livingston 2007-03-24 17:31:10 +00:00
parent 7e450316f2
commit f946888316
6 changed files with 18 additions and 17 deletions

View file

@ -68,14 +68,16 @@
<false/> <false/>
<key>QueueDownloadNumber</key> <key>QueueDownloadNumber</key>
<integer>3</integer> <integer>3</integer>
<key>QueueSeed</key> <key>QueueSeed</key>
<false/> <false/>
<key>QueueSeedNumber</key> <key>QueueSeedNumber</key>
<integer>3</integer> <integer>3</integer>
<key>RatioCheck</key> <key>RatioCheck</key>
<false/> <false/>
<key>RatioLimit</key> <key>RatioLimit</key>
<integer>2</integer> <integer>2</integer>
<key>RemainingSpaceWarning</key>
<true/>
<key>SUScheduledCheckInterval</key> <key>SUScheduledCheckInterval</key>
<integer>86400</integer> <integer>86400</integer>
<key>SeedingSound</key> <key>SeedingSound</key>

View file

@ -9,7 +9,7 @@
<key>153</key> <key>153</key>
<string>294 445 563 268 0 0 1152 842 </string> <string>294 445 563 268 0 0 1152 842 </string>
<key>28</key> <key>28</key>
<string>294 433 563 290 0 0 1152 842 </string> <string>92 421 563 320 0 0 1152 842 </string>
<key>41</key> <key>41</key>
<string>189 445 563 305 0 0 1152 842 </string> <string>189 445 563 305 0 0 1152 842 </string>
<key>66</key> <key>66</key>

View file

@ -60,21 +60,21 @@
- (id) initWithWindowNibName: (NSString *) name handle: (tr_handle_t *) handle; - (id) initWithWindowNibName: (NSString *) name handle: (tr_handle_t *) handle;
- (void) setUpdater: (SUUpdater *) updater; - (void) setUpdater: (SUUpdater *) updater;
- (void) setBadge: (id) sender; - (void) setBadge: (id) sender;
- (void) setSound: (id) sender; - (void) setSound: (id) sender;
- (void) setUpdate: (id) sender; - (void) setUpdate: (id) sender;
- (void) setQueue: (id) sender; - (void) setQueue: (id) sender;
- (void) setQueueNumber: (id) sender; - (void) setQueueNumber: (id) sender;
- (void) setDownloadLocation: (id) sender; - (void) setDownloadLocation: (id) sender;
- (void) folderSheetShow: (id) sender; - (void) folderSheetShow: (id) sender;
- (void) incompleteFolderSheetShow: (id) sender; - (void) incompleteFolderSheetShow: (id) sender;
- (void) setPort: (id) sender; - (void) setPort: (id) sender;
- (void) updatePortStatus; - (void) updatePortStatus;
- (void) portCheckerDidFinishProbing: (PortChecker *) portChecker; - (void) portCheckerDidFinishProbing: (PortChecker *) portChecker;
- (void) setNat: (id) sender; - (void) setNat: (id) sender;
- (void) updateNatStatus; - (void) updateNatStatus;
- (void) applyRatioSetting: (id) sender; - (void) applyRatioSetting: (id) sender;

View file

@ -647,7 +647,7 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
- (BOOL) alertForRemainingDiskSpace - (BOOL) alertForRemainingDiskSpace
{ {
if ([self allDownloaded]) if ([self allDownloaded] || ![fDefaults boolForKey: @"RemainingSpaceWarning"])
return YES; return YES;
NSString * volumeName = [[[NSFileManager defaultManager] componentsToDisplayForPath: [self downloadFolder]] NSString * volumeName = [[[NSFileManager defaultManager] componentsToDisplayForPath: [self downloadFolder]]
@ -656,10 +656,6 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
uint64_t remainingSpace = [[fsAttributes objectForKey: NSFileSystemFreeSize] unsignedLongLongValue], uint64_t remainingSpace = [[fsAttributes objectForKey: NSFileSystemFreeSize] unsignedLongLongValue],
torrentRemaining = [self size] - (uint64_t)[self downloadedValid]; torrentRemaining = [self size] - (uint64_t)[self downloadedValid];
/*NSLog(@"Volume: %@", volumeName);
NSLog(@"Remaining disk space: %qu (%@)", remainingSpace, [NSString stringForFileSize: remainingSpace]);
NSLog(@"Torrent remaining size: %qu (%@)", torrentRemaining, [NSString stringForFileSize: torrentRemaining]);*/
if (volumeName && remainingSpace <= torrentRemaining) if (volumeName && remainingSpace <= torrentRemaining)
{ {
NSAlert * alert = [[NSAlert alloc] init]; NSAlert * alert = [[NSAlert alloc] init];

View file

@ -83,6 +83,9 @@
- (void) placeBar: (NSImage *) barImage width: (float) width point: (NSPoint) point - (void) placeBar: (NSImage *) barImage width: (float) width point: (NSPoint) point
{ {
if (width <= 0.0)
return;
if ([barImage size].width < width) if ([barImage size].width < width)
[barImage setSize: NSMakeSize(width * 2.0, BAR_HEIGHT)]; [barImage setSize: NSMakeSize(width * 2.0, BAR_HEIGHT)];