mirror of
https://github.com/transmission/transmission.git
synced 2026-05-08 09:39:08 +01:00
add an optional clearView method to the InfoViewController protocol
This commit is contained in:
@@ -50,6 +50,6 @@
|
||||
|
||||
- (void) setPiecesView: (id) sender;
|
||||
- (void) setPiecesViewForAvailable: (BOOL) available;
|
||||
- (void) clearPiecesView;
|
||||
- (void) clearView;
|
||||
|
||||
@end
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
[fPiecesView updateView];
|
||||
}
|
||||
|
||||
- (void) clearPiecesView
|
||||
- (void) clearView
|
||||
{
|
||||
[fPiecesView clearView];
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
- (void) setInfoForTorrents: (NSArray *) torrents;
|
||||
- (void) updateInfo;
|
||||
|
||||
- (void) clearPeers;
|
||||
- (void) clearView;
|
||||
- (void) stopWebSeedAnimation;
|
||||
|
||||
@end
|
||||
|
||||
@@ -221,7 +221,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (void) clearPeers
|
||||
- (void) clearView
|
||||
{
|
||||
//if in the middle of animating, just stop and resize immediately
|
||||
if (fWebSeedTableAnimation)
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
- (void) setInfoForTorrents: (NSArray *) torrents;
|
||||
- (void) updateInfo;
|
||||
|
||||
- (void) clearTrackers;
|
||||
- (void) clearView;
|
||||
|
||||
- (void) addRemoveTracker: (id) sender;
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (void) clearTrackers
|
||||
- (void) clearView
|
||||
{
|
||||
[fTrackers release];
|
||||
fTrackers = nil;
|
||||
|
||||
@@ -30,4 +30,7 @@
|
||||
- (void) setInfoForTorrents: (NSArray *) torrents;
|
||||
- (void) updateInfo;
|
||||
|
||||
@optional
|
||||
- (void) clearView;
|
||||
|
||||
@end
|
||||
|
||||
@@ -213,31 +213,24 @@ typedef enum
|
||||
//deselect old tab item
|
||||
[(InfoTabButtonCell *)[fTabMatrix cellWithTag: oldTabTag] setSelectedTab: NO];
|
||||
|
||||
if ([fViewController respondsToSelector: @selector(clearView)])
|
||||
[fViewController clearView];
|
||||
|
||||
switch (oldTabTag)
|
||||
{
|
||||
case TAB_ACTIVITY_TAG:
|
||||
[fActivityViewController clearPiecesView];
|
||||
break;
|
||||
|
||||
case TAB_TRACKERS_TAG:
|
||||
[fTrackersViewController clearTrackers];
|
||||
|
||||
oldResizeSaveKey = @"InspectorContentHeightTracker";
|
||||
break;
|
||||
|
||||
case TAB_PEERS_TAG:
|
||||
[fPeersViewController clearPeers];
|
||||
|
||||
oldResizeSaveKey = @"InspectorContentHeightPeers";
|
||||
break;
|
||||
|
||||
case TAB_FILE_TAG:
|
||||
oldResizeSaveKey = @"InspectorContentHeightFiles";
|
||||
break;
|
||||
}
|
||||
|
||||
NSView * oldView = [fViewController view];
|
||||
oldHeight = [oldView frame].size.height;
|
||||
oldHeight = NSHeight([oldView frame]);
|
||||
if (oldResizeSaveKey)
|
||||
[[NSUserDefaults standardUserDefaults] setFloat: oldHeight forKey: oldResizeSaveKey];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user