mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 20:35:36 +00:00
add an option in the per-torrent action menu to follow the global bandwidth limit
This commit is contained in:
@@ -555,6 +555,9 @@
|
||||
fMenuTorrent = [[self itemAtRow: row] retain];
|
||||
[self createFileMenu: fActionMenu forFiles: [fMenuTorrent fileList]];
|
||||
|
||||
//update global limit check
|
||||
[fGlobalLimitItem setState: [fMenuTorrent usesGlobalSpeedLimit] ? NSOnState : NSOffState];
|
||||
|
||||
//place menu below button
|
||||
NSRect rect = [fTorrentCell iconRectForBounds: [self rectOfRow: row]];
|
||||
NSPoint location = rect.origin;
|
||||
@@ -580,7 +583,6 @@
|
||||
if (!fMenuTorrent || ![menu supermenu])
|
||||
return;
|
||||
|
||||
#warning add menu item for global limit
|
||||
if (menu == fUploadMenu || menu == fDownloadMenu)
|
||||
{
|
||||
NSMenuItem * item;
|
||||
@@ -735,6 +737,13 @@
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName: @"UpdateOptions" object: nil];
|
||||
}
|
||||
|
||||
- (void) setGlobalLimit: (id) sender
|
||||
{
|
||||
[fMenuTorrent setUseGlobalSpeedLimit: [sender state] != NSOnState];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName: @"UpdateOptions" object: nil];
|
||||
}
|
||||
|
||||
- (void) setQuickRatioMode: (id) sender
|
||||
{
|
||||
tr_ratiolimit mode;
|
||||
|
||||
Reference in New Issue
Block a user