mirror of
https://github.com/transmission/transmission
synced 2024-12-24 16:52:39 +00:00
save collapsed groups between launches
This commit is contained in:
parent
4d472ae9f7
commit
a06c1ace83
3 changed files with 12 additions and 1 deletions
|
@ -580,6 +580,7 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
|
|||
|
||||
//save history
|
||||
[self updateTorrentHistory];
|
||||
[fTableView saveCollapsedGroups];
|
||||
|
||||
//remaining calls the same as dealloc
|
||||
[fInfoController release];
|
||||
|
|
|
@ -55,6 +55,7 @@
|
|||
- (BOOL) isGroupCollapsed: (int) value;
|
||||
- (void) removeCollapsedGroup: (int) value;
|
||||
- (void) removeAllCollapsedGroups;
|
||||
- (void) saveCollapsedGroups;
|
||||
|
||||
- (void) removeButtonTrackingAreas;
|
||||
- (void) setControlButtonHover: (int) row;
|
||||
|
|
|
@ -63,7 +63,11 @@
|
|||
if (![NSApp isOnLeopardOrBetter])
|
||||
[[self tableColumnWithIdentifier: @"Torrent"] setDataCell: fTorrentCell];
|
||||
|
||||
fCollapsedGroups = [[NSMutableIndexSet alloc] init];
|
||||
NSData * groupData = [fDefaults dataForKey: @"CollapsedGroups"];
|
||||
if (groupData)
|
||||
fCollapsedGroups = [[NSUnarchiver unarchiveObjectWithData: groupData] retain];
|
||||
else
|
||||
fCollapsedGroups = [[NSMutableIndexSet alloc] init];
|
||||
|
||||
fMouseControlRow = -1;
|
||||
fMouseRevealRow = -1;
|
||||
|
@ -113,6 +117,11 @@
|
|||
[fCollapsedGroups removeAllIndexes];
|
||||
}
|
||||
|
||||
- (void) saveCollapsedGroups
|
||||
{
|
||||
[fDefaults setObject: [NSArchiver archivedDataWithRootObject: fCollapsedGroups] forKey: @"CollapsedGroups"];
|
||||
}
|
||||
|
||||
- (BOOL) outlineView: (NSOutlineView *) outlineView isGroupItem: (id) item
|
||||
{
|
||||
return ![item isKindOfClass: [Torrent class]];
|
||||
|
|
Loading…
Reference in a new issue