mirror of
https://github.com/transmission/transmission
synced 2025-02-20 13:16:53 +00:00
enable and check group menu items appropriately; update news
This commit is contained in:
parent
d9246b1ad4
commit
93df72df07
2 changed files with 19 additions and 0 deletions
1
NEWS
1
NEWS
|
@ -8,6 +8,7 @@ NEWS file for Transmission <http://transmission.m0k.org/>
|
|||
+ Updated icon
|
||||
- OS X:
|
||||
+ Redesigned Leopard-like look
|
||||
+ Group labels
|
||||
+ Statistics window
|
||||
+ Pieces Bar (return of Advanced Bar)
|
||||
+ Availability Bar (overlay on regular bar)
|
||||
|
|
|
@ -3076,6 +3076,24 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
|
|||
return YES;
|
||||
}
|
||||
|
||||
if (action == @selector(setGroup:))
|
||||
{
|
||||
BOOL checked = NO;
|
||||
|
||||
int index = [[menuItem representedObject] intValue];
|
||||
NSEnumerator * enumerator = [[fDisplayedTorrents objectsAtIndexes: [fTableView selectedRowIndexes]] objectEnumerator];
|
||||
Torrent * torrent;
|
||||
while ((torrent = [enumerator nextObject]))
|
||||
if (index == [torrent groupValue])
|
||||
{
|
||||
checked = YES;
|
||||
break;
|
||||
}
|
||||
|
||||
[menuItem setState: checked ? NSOnState : NSOffState];
|
||||
return canUseTable && [fTableView numberOfSelectedRows] > 0;
|
||||
}
|
||||
|
||||
if (action == @selector(toggleSmallView:))
|
||||
{
|
||||
[menuItem setState: [fDefaults boolForKey: @"SmallView"] ? NSOnState : NSOffState];
|
||||
|
|
Loading…
Reference in a new issue