sort groups by their order in the table

This commit is contained in:
Mitchell Livingston
2007-12-17 20:10:51 +00:00
parent 17682552ec
commit 0fc13c3d6a
5 changed files with 22 additions and 1 deletions

View File

@@ -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];