1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 01:03:01 +00:00

apply patch from #324

This commit is contained in:
Mitchell Livingston 2007-06-25 22:35:18 +00:00
parent f36d558ad4
commit 7a8fbb837e

View file

@ -1085,6 +1085,12 @@
NSTextField * field = upload ? fUploadLimitField : fDownloadLimitField; NSTextField * field = upload ? fUploadLimitField : fDownloadLimitField;
[field setHidden: setting != NSOnState]; [field setHidden: setting != NSOnState];
if (setting == NSOnState)
{
[field selectText: self];
[[self window] makeKeyAndOrderFront:self];
}
NSTextField * label = upload ? fUploadLimitLabel : fDownloadLimitLabel; NSTextField * label = upload ? fUploadLimitLabel : fDownloadLimitLabel;
[label setHidden: setting != NSOnState]; [label setHidden: setting != NSOnState];
} }
@ -1131,6 +1137,11 @@
[torrent setRatioSetting: setting]; [torrent setRatioSetting: setting];
[fRatioLimitField setHidden: setting != NSOnState]; [fRatioLimitField setHidden: setting != NSOnState];
if (setting == NSOnState)
{
[fRatioLimitField selectText: self];
[[self window] makeKeyAndOrderFront:self];
}
[[NSNotificationCenter defaultCenter] postNotificationName: @"UpdateUI" object: nil]; [[NSNotificationCenter defaultCenter] postNotificationName: @"UpdateUI" object: nil];
} }