mirror of
https://github.com/transmission/transmission
synced 2024-12-25 09:13:06 +00:00
only allow update checks daily, and remove an unused method
This commit is contained in:
parent
7b9e4c8eda
commit
974bc096e1
7 changed files with 13 additions and 58 deletions
|
@ -16,6 +16,8 @@
|
|||
<integer>9090</integer>
|
||||
<key>CheckDownload</key>
|
||||
<false/>
|
||||
<key>CheckForUpdates</key>
|
||||
<true/>
|
||||
<key>CheckQuit</key>
|
||||
<true/>
|
||||
<key>CheckQuitDownloading</key>
|
||||
|
@ -76,8 +78,6 @@
|
|||
<false/>
|
||||
<key>RatioLimit</key>
|
||||
<integer>2</integer>
|
||||
<key>SUScheduledCheckInterval</key>
|
||||
<integer>86400</integer>
|
||||
<key>SeedingSound</key>
|
||||
<string>Submarine</string>
|
||||
<key>ShowInspector</key>
|
||||
|
@ -106,8 +106,6 @@
|
|||
<integer>30</integer>
|
||||
<key>StatusBar</key>
|
||||
<true/>
|
||||
<key>UpdateCheck</key>
|
||||
<string>Daily</string>
|
||||
<key>UploadLimit</key>
|
||||
<integer>20</integer>
|
||||
<key>UseAdvancedBar</key>
|
||||
|
|
3
macosx/English.lproj/PrefsWindow.nib/classes.nib
generated
3
macosx/English.lproj/PrefsWindow.nib/classes.nib
generated
|
@ -16,6 +16,7 @@
|
|||
setAutoSize = id;
|
||||
setAutoSpeedLimit = id;
|
||||
setBadge = id;
|
||||
setCheckForUpdate = id;
|
||||
setDownloadLocation = id;
|
||||
setGlobalLimit = id;
|
||||
setNat = id;
|
||||
|
@ -27,7 +28,6 @@
|
|||
setSpeedLimit = id;
|
||||
setStalled = id;
|
||||
setStalledMinutes = id;
|
||||
setUpdate = id;
|
||||
};
|
||||
CLASS = PrefsController;
|
||||
LANGUAGE = ObjC;
|
||||
|
@ -55,7 +55,6 @@
|
|||
fSpeedLimitUploadField = NSTextField;
|
||||
fStalledField = NSTextField;
|
||||
fTransfersView = NSView;
|
||||
fUpdatePopUp = NSPopUpButton;
|
||||
fUploadField = NSTextField;
|
||||
};
|
||||
SUPERCLASS = NSWindowController;
|
||||
|
|
6
macosx/English.lproj/PrefsWindow.nib/info.nib
generated
6
macosx/English.lproj/PrefsWindow.nib/info.nib
generated
|
@ -9,9 +9,9 @@
|
|||
<key>153</key>
|
||||
<string>294 444 563 268 0 0 1152 842 </string>
|
||||
<key>28</key>
|
||||
<string>294 421 563 313 0 0 1152 842 </string>
|
||||
<string>138 430 563 313 0 0 1152 842 </string>
|
||||
<key>41</key>
|
||||
<string>294 425 563 305 0 0 1152 842 </string>
|
||||
<string>294 426 563 305 0 0 1152 842 </string>
|
||||
<key>66</key>
|
||||
<string>294 506 563 144 0 0 1152 842 </string>
|
||||
</dict>
|
||||
|
@ -23,7 +23,7 @@
|
|||
</array>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>41</integer>
|
||||
<integer>28</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>8R218</string>
|
||||
|
|
BIN
macosx/English.lproj/PrefsWindow.nib/keyedobjects.nib
generated
BIN
macosx/English.lproj/PrefsWindow.nib/keyedobjects.nib
generated
Binary file not shown.
|
@ -43,7 +43,6 @@
|
|||
NSArray * fSounds;
|
||||
|
||||
SUUpdater * fUpdater;
|
||||
IBOutlet NSPopUpButton * fUpdatePopUp;
|
||||
|
||||
IBOutlet NSTextField * fUploadField, * fDownloadField,
|
||||
* fSpeedLimitUploadField, * fSpeedLimitDownloadField;
|
||||
|
@ -62,7 +61,7 @@
|
|||
- (void) setBadge: (id) sender;
|
||||
- (void) setSound: (id) sender;
|
||||
- (void) resetWarnings: (id) sender;
|
||||
- (void) setUpdate: (id) sender;
|
||||
- (void) setCheckForUpdate: (id) sender;
|
||||
|
||||
- (void) setQueue: (id) sender;
|
||||
- (void) setQueueNumber: (id) sender;
|
||||
|
|
|
@ -30,9 +30,7 @@
|
|||
#define DOWNLOAD_TORRENT 2
|
||||
#define DOWNLOAD_ASK 3
|
||||
|
||||
#define UPDATE_DAILY 0
|
||||
#define UPDATE_WEEKLY 1
|
||||
#define UPDATE_NEVER 2
|
||||
#define UPDATE_SECONDS 86400
|
||||
|
||||
#define TOOLBAR_GENERAL @"TOOLBAR_GENERAL"
|
||||
#define TOOLBAR_TRANSFERS @"TOOLBAR_TRANSFERS"
|
||||
|
@ -65,6 +63,9 @@
|
|||
[fDefaults setBool: NO forKey: @"CheckUpload"];
|
||||
}
|
||||
|
||||
//set check for update to right value
|
||||
[self setCheckForUpdate: nil];
|
||||
|
||||
//set auto import
|
||||
NSString * autoPath;
|
||||
if ([fDefaults boolForKey: @"AutoImport"] && (autoPath = [fDefaults stringForKey: @"AutoImportDirectory"]))
|
||||
|
@ -157,15 +158,6 @@
|
|||
|
||||
//set stalled value
|
||||
[fStalledField setIntValue: [fDefaults integerForKey: @"StalledMinutes"]];
|
||||
|
||||
//set update check
|
||||
NSString * updateCheck = [fDefaults stringForKey: @"UpdateCheck"];
|
||||
if ([updateCheck isEqualToString: @"Weekly"])
|
||||
[fUpdatePopUp selectItemAtIndex: UPDATE_WEEKLY];
|
||||
else if ([updateCheck isEqualToString: @"Never"])
|
||||
[fUpdatePopUp selectItemAtIndex: UPDATE_NEVER];
|
||||
else
|
||||
[fUpdatePopUp selectItemAtIndex: UPDATE_DAILY];
|
||||
}
|
||||
|
||||
- (void) setUpdater: (SUUpdater *) updater
|
||||
|
@ -446,30 +438,10 @@
|
|||
[fDefaults setBool: YES forKey: @"WarningRemainingSpace"];
|
||||
}
|
||||
|
||||
- (void) setUpdate: (id) sender
|
||||
- (void) setCheckForUpdate: (id) sender
|
||||
{
|
||||
int index = [fUpdatePopUp indexOfSelectedItem];
|
||||
NSString * update;
|
||||
NSTimeInterval seconds;
|
||||
if (index == UPDATE_DAILY)
|
||||
{
|
||||
update = @"Daily";
|
||||
seconds = 86400;
|
||||
}
|
||||
else if (index == UPDATE_WEEKLY)
|
||||
{
|
||||
update = @"Weekly";
|
||||
seconds = 604800;
|
||||
}
|
||||
else
|
||||
{
|
||||
update = @"Never";
|
||||
seconds = 0;
|
||||
}
|
||||
|
||||
[fDefaults setObject: update forKey: @"UpdateCheck"];
|
||||
NSTimeInterval seconds = [fDefaults boolForKey: @"CheckForUpdates"] ? UPDATE_SECONDS : 0;
|
||||
[fDefaults setInteger: seconds forKey: @"SUScheduledCheckInterval"];
|
||||
|
||||
if (fUpdater)
|
||||
[fUpdater scheduleCheckWithInterval: seconds];
|
||||
}
|
||||
|
|
|
@ -444,19 +444,6 @@
|
|||
|
||||
@implementation TorrentTableView (Private)
|
||||
|
||||
- (NSRect) iconRectForRow: (int) row
|
||||
{
|
||||
if (row < 0)
|
||||
return NSZeroRect;
|
||||
|
||||
NSRect cellRect = [self frameOfCellAtColumn: [self columnWithIdentifier: @"Torrent"] row: row];
|
||||
NSSize iconSize = [fDefaults boolForKey: @"SmallView"] ? [[[fTorrents objectAtIndex: row] iconSmall] size]
|
||||
: [[[fTorrents objectAtIndex: row] iconFlipped] size];
|
||||
|
||||
return NSMakeRect(cellRect.origin.x + PADDING, cellRect.origin.y + (cellRect.size.height - iconSize.height) * 0.5,
|
||||
iconSize.width, iconSize.height);
|
||||
}
|
||||
|
||||
- (NSRect) pauseRectForRow: (int) row
|
||||
{
|
||||
if (row < 0)
|
||||
|
|
Loading…
Reference in a new issue