mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 20:35:36 +00:00
sort groups by their order in the table
This commit is contained in:
@@ -138,6 +138,18 @@ GroupsWindowController * fGroupsWindowInstance = nil;
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (int) orderValueForIndex: (int) index
|
||||
{
|
||||
if (index != -1)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < [fGroups count]; i++)
|
||||
if (index == [[[fGroups objectAtIndex: i] objectForKey: @"Index"] intValue])
|
||||
return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
- (NSInteger) numberOfRowsInTableView: (NSTableView *) tableview
|
||||
{
|
||||
return [fGroups count];
|
||||
|
||||
Reference in New Issue
Block a user