mirror of
https://github.com/transmission/transmission
synced 2025-03-09 21:54:09 +00:00
warnings--
This commit is contained in:
parent
1502435758
commit
79656bcf26
1 changed files with 136 additions and 141 deletions
|
@ -157,6 +157,28 @@
|
||||||
[fDownloadedValidField setStringValue: @""];
|
[fDownloadedValidField setStringValue: @""];
|
||||||
[fDownloadedTotalField setStringValue: @""];
|
[fDownloadedTotalField setStringValue: @""];
|
||||||
[fUploadedTotalField setStringValue: @""];
|
[fUploadedTotalField setStringValue: @""];
|
||||||
|
|
||||||
|
//options fields
|
||||||
|
[fUploadLimitPopUp setEnabled: NO];
|
||||||
|
[fUploadLimitPopUp selectItemAtIndex: -1];
|
||||||
|
[fUploadLimitField setHidden: YES];
|
||||||
|
[fUploadLimitLabel setHidden: YES];
|
||||||
|
[fUploadLimitField setStringValue: @""];
|
||||||
|
|
||||||
|
[fDownloadLimitPopUp setEnabled: NO];
|
||||||
|
[fDownloadLimitPopUp selectItemAtIndex: -1];
|
||||||
|
[fDownloadLimitField setHidden: YES];
|
||||||
|
[fDownloadLimitLabel setHidden: YES];
|
||||||
|
[fDownloadLimitField setStringValue: @""];
|
||||||
|
|
||||||
|
[fRatioPopUp setEnabled: NO];
|
||||||
|
[fRatioPopUp selectItemAtIndex: -1];
|
||||||
|
[fRatioLimitField setHidden: YES];
|
||||||
|
[fRatioLimitField setStringValue: @""];
|
||||||
|
|
||||||
|
[fPexCheck setEnabled: NO];
|
||||||
|
[fPexCheck setState: NSOffState];
|
||||||
|
[fPexCheck setToolTip: @""];
|
||||||
}
|
}
|
||||||
|
|
||||||
[fImageView setImage: fAppIcon];
|
[fImageView setImage: fAppIcon];
|
||||||
|
@ -456,8 +478,9 @@
|
||||||
|
|
||||||
- (void) updateInfoSettings
|
- (void) updateInfoSettings
|
||||||
{
|
{
|
||||||
if ([fTorrents count] > 0)
|
if ([fTorrents count] == 0)
|
||||||
{
|
return;
|
||||||
|
|
||||||
Torrent * torrent;
|
Torrent * torrent;
|
||||||
|
|
||||||
//get bandwidth info
|
//get bandwidth info
|
||||||
|
@ -469,9 +492,9 @@
|
||||||
downloadSpeedMode = [torrent speedMode: NO],
|
downloadSpeedMode = [torrent speedMode: NO],
|
||||||
downloadSpeedLimit = [torrent speedLimit: NO];
|
downloadSpeedLimit = [torrent speedLimit: NO];
|
||||||
|
|
||||||
while ((uploadSpeedMode != INVALID || uploadSpeedLimit != INVALID
|
while ((torrent = [enumerator nextObject])
|
||||||
|| downloadSpeedMode != INVALID || downloadSpeedLimit != INVALID)
|
&& (uploadSpeedMode != INVALID || uploadSpeedLimit != INVALID
|
||||||
&& (torrent = [enumerator nextObject]))
|
|| downloadSpeedMode != INVALID || downloadSpeedLimit != INVALID))
|
||||||
{
|
{
|
||||||
if (uploadSpeedMode != INVALID && uploadSpeedMode != [torrent speedMode: YES])
|
if (uploadSpeedMode != INVALID && uploadSpeedMode != [torrent speedMode: YES])
|
||||||
uploadSpeedMode = INVALID;
|
uploadSpeedMode = INVALID;
|
||||||
|
@ -532,8 +555,7 @@
|
||||||
int checkRatio = [torrent ratioSetting];
|
int checkRatio = [torrent ratioSetting];
|
||||||
float ratioLimit = [torrent ratioLimit];
|
float ratioLimit = [torrent ratioLimit];
|
||||||
|
|
||||||
while ((checkRatio != INVALID || checkRatio != INVALID)
|
while ((torrent = [enumerator nextObject]) && (checkRatio != INVALID || checkRatio != INVALID))
|
||||||
&& (torrent = [enumerator nextObject]))
|
|
||||||
{
|
{
|
||||||
if (checkRatio != INVALID && checkRatio != [torrent ratioSetting])
|
if (checkRatio != INVALID && checkRatio != [torrent ratioSetting])
|
||||||
checkRatio = INVALID;
|
checkRatio = INVALID;
|
||||||
|
@ -567,8 +589,7 @@
|
||||||
BOOL pexEnabled = ![torrent privateTorrent] && [torrent isPaused];
|
BOOL pexEnabled = ![torrent privateTorrent] && [torrent isPaused];
|
||||||
int pexState = [torrent pex] ? NSOnState : NSOffState;
|
int pexState = [torrent pex] ? NSOnState : NSOffState;
|
||||||
|
|
||||||
while ((pexEnabled || pexState != NSMixedState)
|
while ((torrent = [enumerator nextObject]) && (pexEnabled || pexState != NSMixedState))
|
||||||
&& (torrent = [enumerator nextObject]))
|
|
||||||
{
|
{
|
||||||
if (pexEnabled)
|
if (pexEnabled)
|
||||||
pexEnabled = ![torrent privateTorrent] && [torrent isPaused];
|
pexEnabled = ![torrent privateTorrent] && [torrent isPaused];
|
||||||
|
@ -582,32 +603,6 @@
|
||||||
[fPexCheck setToolTip: !pexEnabled ? NSLocalizedString(@"PEX can only be toggled on paused public torrents.",
|
[fPexCheck setToolTip: !pexEnabled ? NSLocalizedString(@"PEX can only be toggled on paused public torrents.",
|
||||||
"Inspector -> pex check") : @""];
|
"Inspector -> pex check") : @""];
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
#warning move
|
|
||||||
|
|
||||||
[fUploadLimitPopUp setEnabled: NO];
|
|
||||||
[fUploadLimitPopUp selectItemAtIndex: -1];
|
|
||||||
[fUploadLimitField setHidden: YES];
|
|
||||||
[fUploadLimitLabel setHidden: YES];
|
|
||||||
[fUploadLimitField setStringValue: @""];
|
|
||||||
|
|
||||||
[fDownloadLimitPopUp setEnabled: NO];
|
|
||||||
[fDownloadLimitPopUp selectItemAtIndex: -1];
|
|
||||||
[fDownloadLimitField setHidden: YES];
|
|
||||||
[fDownloadLimitLabel setHidden: YES];
|
|
||||||
[fDownloadLimitField setStringValue: @""];
|
|
||||||
|
|
||||||
[fRatioPopUp setEnabled: NO];
|
|
||||||
[fRatioPopUp selectItemAtIndex: -1];
|
|
||||||
[fRatioLimitField setHidden: YES];
|
|
||||||
[fRatioLimitField setStringValue: @""];
|
|
||||||
|
|
||||||
[fPexCheck setEnabled: NO];
|
|
||||||
[fPexCheck setState: NSOffState];
|
|
||||||
[fPexCheck setToolTip: @""];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- (BOOL) validateMenuItem: (NSMenuItem *) menuItem
|
- (BOOL) validateMenuItem: (NSMenuItem *) menuItem
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue