From a492cadf007d51a58fd35bbc1061e210e84118d7 Mon Sep 17 00:00:00 2001 From: rakshasa Date: Tue, 3 Jul 2007 00:33:18 +0000 Subject: [PATCH] * ^X now passes the selected download to the command. * Added support for writing Objects to generic char* buffers. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@927 e378c898-3ddf-0310-93e7-cc216c733640 --- src/rpc/command_map.cc | 2 +- src/ui/download_list.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rpc/command_map.cc b/src/rpc/command_map.cc index 93d70073..96bfadbd 100644 --- a/src/rpc/command_map.cc +++ b/src/rpc/command_map.cc @@ -102,7 +102,7 @@ CommandMap::call_command_d(key_type key, core::Download* download, const mapped_ if (itr == base_type::end()) throw torrent::input_error("Command \"" + std::string(key) + "\" does not exist."); - if (itr->second.m_downloadSlot == NULL) { + if (itr->second.m_downloadSlot == NULL || download == NULL) { if (itr->second.m_genericSlot == NULL) throw torrent::input_error("Command does not have a generic slot."); diff --git a/src/ui/download_list.cc b/src/ui/download_list.cc index fb85914f..e0c41304 100644 --- a/src/ui/download_list.cc +++ b/src/ui/download_list.cc @@ -292,7 +292,7 @@ DownloadList::receive_exit_input(Input type) { break; case INPUT_COMMAND: - rpc::parse_command_single_std(input->str()); + rpc::parse_command_d_single_std(current_view()->focus() != current_view()->end_visible() ? *current_view()->focus() : NULL, input->str()); break; default: