mirror of
https://github.com/transmission/transmission
synced 2024-12-25 01:03:01 +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
|
//save history
|
||||||
[self updateTorrentHistory];
|
[self updateTorrentHistory];
|
||||||
|
[fTableView saveCollapsedGroups];
|
||||||
|
|
||||||
//remaining calls the same as dealloc
|
//remaining calls the same as dealloc
|
||||||
[fInfoController release];
|
[fInfoController release];
|
||||||
|
|
|
@ -55,6 +55,7 @@
|
||||||
- (BOOL) isGroupCollapsed: (int) value;
|
- (BOOL) isGroupCollapsed: (int) value;
|
||||||
- (void) removeCollapsedGroup: (int) value;
|
- (void) removeCollapsedGroup: (int) value;
|
||||||
- (void) removeAllCollapsedGroups;
|
- (void) removeAllCollapsedGroups;
|
||||||
|
- (void) saveCollapsedGroups;
|
||||||
|
|
||||||
- (void) removeButtonTrackingAreas;
|
- (void) removeButtonTrackingAreas;
|
||||||
- (void) setControlButtonHover: (int) row;
|
- (void) setControlButtonHover: (int) row;
|
||||||
|
|
|
@ -63,6 +63,10 @@
|
||||||
if (![NSApp isOnLeopardOrBetter])
|
if (![NSApp isOnLeopardOrBetter])
|
||||||
[[self tableColumnWithIdentifier: @"Torrent"] setDataCell: fTorrentCell];
|
[[self tableColumnWithIdentifier: @"Torrent"] setDataCell: fTorrentCell];
|
||||||
|
|
||||||
|
NSData * groupData = [fDefaults dataForKey: @"CollapsedGroups"];
|
||||||
|
if (groupData)
|
||||||
|
fCollapsedGroups = [[NSUnarchiver unarchiveObjectWithData: groupData] retain];
|
||||||
|
else
|
||||||
fCollapsedGroups = [[NSMutableIndexSet alloc] init];
|
fCollapsedGroups = [[NSMutableIndexSet alloc] init];
|
||||||
|
|
||||||
fMouseControlRow = -1;
|
fMouseControlRow = -1;
|
||||||
|
@ -113,6 +117,11 @@
|
||||||
[fCollapsedGroups removeAllIndexes];
|
[fCollapsedGroups removeAllIndexes];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void) saveCollapsedGroups
|
||||||
|
{
|
||||||
|
[fDefaults setObject: [NSArchiver archivedDataWithRootObject: fCollapsedGroups] forKey: @"CollapsedGroups"];
|
||||||
|
}
|
||||||
|
|
||||||
- (BOOL) outlineView: (NSOutlineView *) outlineView isGroupItem: (id) item
|
- (BOOL) outlineView: (NSOutlineView *) outlineView isGroupItem: (id) item
|
||||||
{
|
{
|
||||||
return ![item isKindOfClass: [Torrent class]];
|
return ![item isKindOfClass: [Torrent class]];
|
||||||
|
|
Loading…
Reference in a new issue