* Made the signal in View trigger using a task, thus avoiding bad

recursions and wrongly orderer commands. This should fix some problems
with hash checking returning errno 0.

* More changes to View usage.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1048 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2008-03-27 15:41:11 +00:00
parent e8e5ef337b
commit a6045c9ea5
13 changed files with 88 additions and 65 deletions
+6 -5
View File
@@ -60,7 +60,6 @@
namespace core {
class Download;
class DownloadList;
class View : private std::vector<Download*> {
public:
@@ -77,7 +76,7 @@ public:
View() {}
~View();
void initialize(const std::string& name, DownloadList* dlist);
void initialize(const std::string& name);
const std::string& name() const { return m_name; }
@@ -102,7 +101,7 @@ public:
const_iterator focus() const { return begin() + m_focus; }
void set_focus(iterator itr) { m_focus = position(itr); m_signalChanged.emit(); }
void insert(Download* download);
void insert(Download* download) { base_type::push_back(download); }
void erase(Download* download);
void set_visible(Download* download);
@@ -150,14 +149,14 @@ private:
inline void insert_visible(Download* d);
inline void erase_internal(iterator itr);
inline void emit_changed();
size_type position(const_iterator itr) const { return itr - begin(); }
// An received thing for changed status so we can sort and filter.
std::string m_name;
DownloadList* m_list;
size_type m_size;
size_type m_focus;
@@ -171,7 +170,9 @@ private:
std::string m_eventRemoved;
rak::timer m_lastChanged;
signal_type m_signalChanged;
rak::priority_item m_delayChanged;
};
}