From ee353bfc9f47186b8c58611ee649defeac04c537 Mon Sep 17 00:00:00 2001 From: rakshasa Date: Mon, 26 Jun 2006 23:55:54 +0000 Subject: [PATCH] * Bound 'U' for clearing "tied_to_file". * Fixed transfer list to mark peers that sent bad data once the chunk has successfully passed the hash check. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@731 e378c898-3ddf-0310-93e7-cc216c733640 --- autogen.sh | 14 ++++++++------ src/ui/download_list.cc | 13 +++++++++++++ src/ui/download_list.h | 1 + 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/autogen.sh b/autogen.sh index bd7fc988..e4884f7a 100755 --- a/autogen.sh +++ b/autogen.sh @@ -16,15 +16,17 @@ echo autoheader... autoheader -echo libtoolize... -if ( (libtoolize --version) < /dev/null > /dev/null 2>&1 ) ; then - libtoolize --automake --copy --force - -elif ( (glibtoolize --version) < /dev/null > /dev/null 2>&1 ); then +echo -n "libtoolize... " +if ( (glibtoolize --version) < /dev/null > /dev/null 2>&1 ); then + echo "using glibtoolize" glibtoolize --automake --copy --force +elif ( (libtoolize --version) < /dev/null > /dev/null 2>&1 ) ; then + echo "using libtoolize" + libtoolize --automake --copy --force + else - echo libtoolize nor glibtoolize not found + echo "libtoolize nor glibtoolize not found" exit 1 fi diff --git a/src/ui/download_list.cc b/src/ui/download_list.cc index d5fdf3b7..81983f65 100644 --- a/src/ui/download_list.cc +++ b/src/ui/download_list.cc @@ -296,6 +296,18 @@ DownloadList::receive_ignore_ratio() { } } +void +DownloadList::receive_clear_tied() { + if (m_view->focus() == m_view->end_visible()) + return; + + if (!(*m_view->focus())->variable()->get_string("tied_to_file").empty()) { + (*m_view->focus())->variable()->set("tied_to_file", std::string()); + + m_control->core()->push_log("Cleared tied to file association for download."); + } +} + void DownloadList::receive_view_input(Input type) { if (m_windowTextInput->get_active()) @@ -426,6 +438,7 @@ DownloadList::setup_keys() { (*m_bindings)['+'] = sigc::mem_fun(*this, &DownloadList::receive_next_priority); (*m_bindings)['-'] = sigc::mem_fun(*this, &DownloadList::receive_prev_priority); (*m_bindings)['I'] = sigc::mem_fun(*this, &DownloadList::receive_ignore_ratio); + (*m_bindings)['U'] = sigc::mem_fun(*this, &DownloadList::receive_clear_tied); (*m_bindings)['\x7f'] = sigc::bind(sigc::mem_fun(*this, &DownloadList::receive_view_input), INPUT_LOAD_DEFAULT); (*m_bindings)[KEY_BACKSPACE] = sigc::bind(sigc::mem_fun(*this, &DownloadList::receive_view_input), INPUT_LOAD_DEFAULT); diff --git a/src/ui/download_list.h b/src/ui/download_list.h index e7ac2954..e91f1ecc 100644 --- a/src/ui/download_list.h +++ b/src/ui/download_list.h @@ -131,6 +131,7 @@ private: void receive_check_hash(); void receive_ignore_ratio(); + void receive_clear_tied(); void receive_view_input(Input type); void receive_exit_input(Input type);