Adding tracker group cycle.

Adding creation date display.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@468 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2005-06-19 20:44:56 +00:00
parent 7b1e0ec085
commit 9a3d75490f
9 changed files with 52 additions and 19 deletions
+5 -4
View File
@@ -267,11 +267,12 @@ Download::bind_keys() {
(*m_bindings)[KEY_DOWN] = sigc::mem_fun(*this, &Download::receive_next);
// Key bindings for sub-ui's.
m_uiArray[DISPLAY_PEER_LIST]->get_bindings()[KEY_RIGHT] = sigc::bind(sigc::mem_fun(*this, &Download::receive_change), DISPLAY_FILE_LIST);
m_uiArray[DISPLAY_PEER_INFO]->get_bindings()[' '] = sigc::bind(sigc::mem_fun(*this, &Download::receive_change), DISPLAY_PEER_LIST);
m_uiArray[DISPLAY_FILE_LIST]->get_bindings()[KEY_LEFT] = sigc::bind(sigc::mem_fun(*this, &Download::receive_change), DISPLAY_PEER_LIST);
m_uiArray[DISPLAY_TRACKER_LIST]->get_bindings()[' '] = sigc::bind(sigc::mem_fun(*this, &Download::receive_change), DISPLAY_PEER_LIST);
m_uiArray[DISPLAY_PEER_LIST]->get_bindings()[KEY_RIGHT] = sigc::bind(sigc::mem_fun(*this, &Download::receive_change), DISPLAY_FILE_LIST);
m_uiArray[DISPLAY_PEER_INFO]->get_bindings()[KEY_LEFT] = sigc::bind(sigc::mem_fun(*this, &Download::receive_change), DISPLAY_PEER_LIST);
m_uiArray[DISPLAY_FILE_LIST]->get_bindings()[KEY_LEFT] = sigc::bind(sigc::mem_fun(*this, &Download::receive_change), DISPLAY_PEER_LIST);
m_uiArray[DISPLAY_TRACKER_LIST]->get_bindings()[KEY_LEFT] = sigc::bind(sigc::mem_fun(*this, &Download::receive_change), DISPLAY_PEER_LIST);
// Doesn't belong here.
m_uiArray[DISPLAY_PEER_LIST]->get_bindings()['*'] = sigc::mem_fun(*this, &Download::receive_snub_peer);
m_uiArray[DISPLAY_PEER_INFO]->get_bindings()['*'] = sigc::mem_fun(*this, &Download::receive_snub_peer);
}
+15 -1
View File
@@ -37,7 +37,8 @@ ElementTrackerList::ElementTrackerList(core::Download* d) :
m_focus(0) {
m_bindings[KEY_DOWN] = sigc::mem_fun(*this, &ElementTrackerList::receive_next);
m_bindings[KEY_UP] = sigc::mem_fun(*this, &ElementTrackerList::receive_prev);
m_bindings[KEY_UP] = sigc::mem_fun(*this, &ElementTrackerList::receive_prev);
m_bindings[' '] = sigc::mem_fun(*this, &ElementTrackerList::receive_cycle_group);
}
void
@@ -88,4 +89,17 @@ ElementTrackerList::receive_prev() {
m_window->mark_dirty();
}
void
ElementTrackerList::receive_cycle_group() {
if (m_window == NULL)
throw std::logic_error("ui::ElementTrackerList::receive_group_cycle(...) called on a disabled object");
if (m_focus >= m_download->get_download().get_tracker_size())
throw std::logic_error("ui::ElementTrackerList::receive_group_cycle(...) called with an invalid focus");
m_download->get_download().cycle_tracker_group(m_download->get_download().get_tracker(m_focus).get_group());
m_window->mark_dirty();
}
}
+2
View File
@@ -48,6 +48,8 @@ private:
void receive_next();
void receive_prev();
void receive_cycle_group();
core::Download* m_download;
WTrackerList* m_window;