mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-07 14:49:21 +00:00
* Added the ability to set the timeout in torrent::Http. Torrent
downloads now have longer timeout than tracker requests. * Bound the '*' key in tracker list to disable a tracker. * Added PollKQueue placeholder, implementation will come later. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@598 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -54,6 +54,7 @@ ElementTrackerList::ElementTrackerList(core::Download* d) :
|
||||
m_bindings[KEY_DOWN] = sigc::mem_fun(*this, &ElementTrackerList::receive_next);
|
||||
m_bindings[KEY_UP] = sigc::mem_fun(*this, &ElementTrackerList::receive_prev);
|
||||
m_bindings[' '] = sigc::mem_fun(*this, &ElementTrackerList::receive_cycle_group);
|
||||
m_bindings['*'] = sigc::mem_fun(*this, &ElementTrackerList::receive_disable);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -77,6 +78,19 @@ ElementTrackerList::disable(Control* c) {
|
||||
m_window = NULL;
|
||||
}
|
||||
|
||||
void
|
||||
ElementTrackerList::receive_disable() {
|
||||
if (m_window == NULL)
|
||||
throw std::logic_error("ui::ElementTrackerList::receive_disable(...) called on a disabled object");
|
||||
|
||||
if (m_download->get_download().tracker(m_focus).is_enabled())
|
||||
m_download->get_download().tracker(m_focus).disable();
|
||||
else
|
||||
m_download->get_download().tracker(m_focus).enable();
|
||||
|
||||
m_window->mark_dirty();
|
||||
}
|
||||
|
||||
void
|
||||
ElementTrackerList::receive_next() {
|
||||
if (m_window == NULL)
|
||||
|
||||
@@ -62,6 +62,8 @@ private:
|
||||
void receive_next();
|
||||
void receive_prev();
|
||||
|
||||
void receive_disable();
|
||||
|
||||
void receive_cycle_group();
|
||||
|
||||
core::Download* m_download;
|
||||
|
||||
Reference in New Issue
Block a user