mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 12:28:52 +00:00
remove references and dead code to the group window being its own window; other rearrangements of code
This commit is contained in:
@@ -193,18 +193,15 @@ GroupsController * fGroupsInstance = nil;
|
||||
[self saveGroups];
|
||||
}
|
||||
|
||||
- (void) removeGroupWithRowIndexes: (NSIndexSet *) rowIndexes
|
||||
- (void) removeGroupWithRowIndex: (NSInteger) row
|
||||
{
|
||||
NSMutableIndexSet * indexes = [NSMutableIndexSet indexSet];
|
||||
for (NSInteger index = [rowIndexes firstIndex]; index != NSNotFound; index = [rowIndexes indexGreaterThanIndex: index])
|
||||
[indexes addIndex: [[[fGroups objectAtIndex: index] objectForKey: @"Index"] intValue]];
|
||||
|
||||
[fGroups removeObjectsAtIndexes: rowIndexes];
|
||||
NSInteger index = [[[fGroups objectAtIndex: row] objectForKey: @"Index"] intValue];
|
||||
[fGroups removeObjectAtIndex: index];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName: @"GroupValueRemoved" object: self userInfo:
|
||||
[NSDictionary dictionaryWithObject: indexes forKey: @"Indexes"]];
|
||||
[NSDictionary dictionaryWithObject: [NSNumber numberWithInt: index] forKey: @"Index"]];
|
||||
|
||||
if ([indexes containsIndex: [[NSUserDefaults standardUserDefaults] integerForKey: @"FilterGroup"]])
|
||||
if (index == [[NSUserDefaults standardUserDefaults] integerForKey: @"FilterGroup"])
|
||||
[[NSUserDefaults standardUserDefaults] setInteger: -2 forKey: @"FilterGroup"];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName: @"UpdateGroups" object: self];
|
||||
|
||||
Reference in New Issue
Block a user