name: @"MakeWindowKey" object: nil];
#warning look at this
- [nc addObserver: self selector: @selector(updateTorrentsInQueue)
+ [nc addObserver: self selector: @selector(fullUpdateUI)
name: @"UpdateQueue" object: nil];
[nc addObserver: self selector: @selector(applyFilter)
}
}
- [self updateTorrentsInQueue];
+ [self fullUpdateUI];
}
- (void) askOpenConfirmed: (AddWindowController *) addController add: (BOOL) add
[fTorrents addObject: torrent];
[torrent release];
- [self updateTorrentsInQueue];
+ [self fullUpdateUI];
}
else
{
[torrent release];
}
- [self updateTorrentsInQueue];
+ [self fullUpdateUI];
}
- (void) askOpenMagnetConfirmed: (AddMagnetWindowController *) addController add: (BOOL) add
[fTorrents addObject: torrent];
[torrent release];
- [self updateTorrentsInQueue];
+ [self fullUpdateUI];
}
else
{
for (Torrent * torrent in torrents)
[torrent startTransfer];
- [self updateTorrentsInQueue];
+ [self fullUpdateUI];
}
- (void) resumeSelectedTorrentsNoWait: (id) sender
for (Torrent * torrent in torrents)
[torrent startTransferNoQueue];
- [self updateTorrentsInQueue];
+ [self fullUpdateUI];
}
- (void) stopSelectedTorrents: (id) sender
for (Torrent * torrent in torrents)
[torrent stopTransfer];
- [self updateTorrentsInQueue];
+ [self fullUpdateUI];
}
- (void) removeTorrents: (NSArray *) torrents deleteData: (BOOL) deleteData
[fTorrents removeObjectsInArray: torrents];
- //if not removed from displayed torrents, updateTorrentsInQueue might cause a crash
+ //if not removed from displayed torrents, fullUpdateUI might cause a crash
if ([fDisplayedTorrents count] > 0)
{
if ([[fDisplayedTorrents objectAtIndex: 0] isKindOfClass: [TorrentGroup class]])
[fTableView selectValues: selectedValues];
- [self updateTorrentsInQueue];
+ [self fullUpdateUI];
}
- (void) removeNoDelete: (id) sender
[fBadger updateBadgeWithDownload: dlRate upload: ulRate];
}
+#warning can this be removed or refined?
+- (void) fullUpdateUI
+{
+ [self updateUI];
+ [self applyFilter];
+ [[fWindow toolbar] validateVisibleItems];
+ [self updateTorrentHistory];
+}
+
- (void) setBottomCountText: (BOOL) filtering
{
NSString * totalTorrentsString;
[fTotalTorrentsField setStringValue: totalTorrentsString];
}
-#warning rename? remove?
-- (void) updateTorrentsInQueue
-{
- [self updateUI];
- [self applyFilter];
- [[fWindow toolbar] validateVisibleItems];
- [self updateTorrentHistory];
-}
-
- (void) torrentFinishedDownloading: (NSNotification *) notification
{
Torrent * torrent = [notification object];
object: [torrent dataLocation]];
}
- [self updateTorrentsInQueue];
+ [self fullUpdateUI];
}
#warning remove?
- (void) torrentRestartedDownloading: (NSNotification *) notification
{
- [self updateTorrentsInQueue];
+ [self fullUpdateUI];
}
- (void) torrentFinishedSeeding: (NSNotification *) notification
{
Torrent * torrent = [notification object];
- [self updateTorrentsInQueue];
+ [self fullUpdateUI];
if ([[fTableView selectedTorrents] containsObject: torrent])
{
[fTorrents addObject: torrent];
[torrent release];
- [self updateTorrentsInQueue];
+ [self fullUpdateUI];
}
- (void) rpcRemoveTorrent: (Torrent *) torrent