mirror of
https://github.com/transmission/transmission
synced 2025-02-20 13:16:53 +00:00
#4694 replace more reloadData table calls with setNeedsDisplay:
This commit is contained in:
parent
16e70167d0
commit
9353eba3cd
6 changed files with 13 additions and 14 deletions
|
@ -276,7 +276,7 @@
|
|||
{
|
||||
[fTorrent update];
|
||||
|
||||
[fFileController reloadData];
|
||||
[fFileController refresh];
|
||||
|
||||
if ([fTorrent isChecking])
|
||||
{
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
|
||||
- (void) setFilterText: (NSString *) text;
|
||||
|
||||
- (void) reloadData;
|
||||
- (void) refresh;
|
||||
|
||||
- (void) setCheck: (id) sender;
|
||||
- (void) setOnlySelectedCheck: (id) sender;
|
||||
|
|
|
@ -238,14 +238,14 @@ typedef enum
|
|||
fFilterText = [text retain];
|
||||
}
|
||||
|
||||
- (void) reloadData
|
||||
- (void) refresh
|
||||
{
|
||||
[fTorrent updateFileStat];
|
||||
|
||||
while (![fLock tryLock])
|
||||
tr_wait_msec(100);
|
||||
|
||||
[fOutline reloadData];
|
||||
[fOutline setNeedsDisplay: YES];
|
||||
|
||||
[fLock unlock];
|
||||
}
|
||||
|
@ -285,8 +285,7 @@ typedef enum
|
|||
return item;
|
||||
}
|
||||
|
||||
- (void) outlineView: (NSOutlineView *) outlineView willDisplayCell: (id) cell
|
||||
forTableColumn: (NSTableColumn *) tableColumn item: (id) item
|
||||
- (void) outlineView: (NSOutlineView *) outlineView willDisplayCell: (id) cell forTableColumn: (NSTableColumn *) tableColumn item: (id) item
|
||||
{
|
||||
NSString * identifier = [tableColumn identifier];
|
||||
if ([identifier isEqualToString: @"Check"])
|
||||
|
@ -301,8 +300,7 @@ typedef enum
|
|||
else;
|
||||
}
|
||||
|
||||
- (void) outlineView: (NSOutlineView *) outlineView setObjectValue: (id) object
|
||||
forTableColumn: (NSTableColumn *) tableColumn byItem: (id) item
|
||||
- (void) outlineView: (NSOutlineView *) outlineView setObjectValue: (id) object forTableColumn: (NSTableColumn *) tableColumn byItem: (id) item
|
||||
{
|
||||
NSString * identifier = [tableColumn identifier];
|
||||
if ([identifier isEqualToString: @"Check"])
|
||||
|
@ -314,7 +312,7 @@ typedef enum
|
|||
indexSet = [(FileListNode *)item indexes];
|
||||
|
||||
[fTorrent setFileCheckState: [object intValue] != NSOffState ? NSOnState : NSOffState forIndexes: indexSet];
|
||||
[fOutline reloadData];
|
||||
[fOutline setNeedsDisplay: YES];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName: @"UpdateUI" object: nil];
|
||||
}
|
||||
|
@ -396,7 +394,7 @@ typedef enum
|
|||
[itemIndexes addIndexes: [[fOutline itemAtRow: i] indexes]];
|
||||
|
||||
[fTorrent setFileCheckState: state forIndexes: itemIndexes];
|
||||
[fOutline reloadData];
|
||||
[fOutline setNeedsDisplay: YES];
|
||||
|
||||
[fLock unlock];
|
||||
}
|
||||
|
@ -417,7 +415,7 @@ typedef enum
|
|||
[remainingItemIndexes removeIndexes: itemIndexes];
|
||||
[fTorrent setFileCheckState: NSOffState forIndexes: remainingItemIndexes];
|
||||
|
||||
[fOutline reloadData];
|
||||
[fOutline setNeedsDisplay: YES];
|
||||
|
||||
[fLock unlock];
|
||||
}
|
||||
|
@ -446,7 +444,7 @@ typedef enum
|
|||
[itemIndexes addIndexes: [[fOutline itemAtRow: i] indexes]];
|
||||
|
||||
[fTorrent setFilePriority: priority forIndexes: itemIndexes];
|
||||
[fOutline reloadData];
|
||||
[fOutline setNeedsDisplay: YES];
|
||||
|
||||
[fLock unlock];
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
[torrent setFilePriority: priority forIndexes: [(FileListNode *)[self representedObject] indexes]];
|
||||
|
||||
FileOutlineView * controlView = (FileOutlineView *)[self controlView];
|
||||
[controlView reloadData];
|
||||
[controlView setNeedsDisplay: YES];
|
||||
}
|
||||
|
||||
- (void) addTrackingAreasForView: (NSView *) controlView inRect: (NSRect) cellFrame withUserInfo: (NSDictionary *) userInfo
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
|
||||
- (IBAction) updatedDisplayString: (id) sender
|
||||
{
|
||||
#warning setNeedsDisplay: instead of reloadData?
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName: @"ReloadTorrentTable" object: nil];
|
||||
}
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
[self setupInfo];
|
||||
|
||||
if ([fTorrents count] == 1)
|
||||
[fFileController reloadData];
|
||||
[fFileController refresh];
|
||||
}
|
||||
|
||||
- (void) saveViewSize
|
||||
|
|
Loading…
Reference in a new issue