mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-05 21:59:21 +00:00
* Moving download variables into command_download.cc.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@902 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
+2
-2
@@ -154,13 +154,13 @@ Download::create_info() {
|
||||
|
||||
element->push_back("");
|
||||
element->push_column("Directory:", te_string(&torrent::FileList::root_dir));
|
||||
element->push_column("Tied to file:", te_variable_string("tied_to_file"));
|
||||
element->push_column("Tied to file:", te_variable_string("get_tied_to_file"));
|
||||
|
||||
element->push_back("");
|
||||
element->push_column("Chunks:", te_value(&torrent::FileList::completed_chunks), " / ", te_value(&torrent::FileList::size_chunks), " * ", te_value(&torrent::FileList::chunk_size));
|
||||
element->push_column("Priority:", te_variable_value("priority"));
|
||||
|
||||
element->push_column("State changed:", te_variable_value("state_changed", value_base::flag_timer | value_base::flag_elapsed));
|
||||
element->push_column("State changed:", te_variable_value("get_state_changed", value_base::flag_timer | value_base::flag_elapsed));
|
||||
|
||||
element->push_back("");
|
||||
element->push_column("Memory usage:", te_value(&torrent::ChunkManager::memory_usage, value_base::flag_mb), " MB");
|
||||
|
||||
@@ -151,7 +151,7 @@ ElementDownloadList::receive_stop_download() {
|
||||
if (m_view->focus() == m_view->end_visible())
|
||||
return;
|
||||
|
||||
if ((*m_view->focus())->get_value("state") == 1)
|
||||
if ((*m_view->focus())->get_value("get_state") == 1)
|
||||
control->core()->download_list()->stop_normal(*m_view->focus());
|
||||
else
|
||||
control->core()->download_list()->erase(*m_view->focus());
|
||||
@@ -166,7 +166,7 @@ ElementDownloadList::receive_close_download() {
|
||||
|
||||
core::Download* download = *m_view->focus();
|
||||
|
||||
download->set("ignore_commands", (int64_t)1);
|
||||
download->set("set_ignore_commands", (int64_t)1);
|
||||
|
||||
control->core()->download_list()->stop_normal(download);
|
||||
control->core()->download_list()->close(download);
|
||||
@@ -205,11 +205,11 @@ ElementDownloadList::receive_ignore_ratio() {
|
||||
if (m_view->focus() == m_view->end_visible())
|
||||
return;
|
||||
|
||||
if ((*m_view->focus())->get_value("ignore_commands") != 0) {
|
||||
(*m_view->focus())->set("ignore_commands", (int64_t)0);
|
||||
if ((*m_view->focus())->get_value("get_ignore_commands") != 0) {
|
||||
(*m_view->focus())->set("set_ignore_commands", (int64_t)0);
|
||||
control->core()->push_log("Torrent set to heed commands.");
|
||||
} else {
|
||||
(*m_view->focus())->set("ignore_commands", (int64_t)1);
|
||||
(*m_view->focus())->set("set_ignore_commands", (int64_t)1);
|
||||
control->core()->push_log("Torrent set to ignore commands.");
|
||||
}
|
||||
}
|
||||
@@ -219,7 +219,7 @@ ElementDownloadList::receive_clear_tied() {
|
||||
if (m_view->focus() == m_view->end_visible())
|
||||
return;
|
||||
|
||||
const std::string& tiedFile = (*m_view->focus())->get_string("tied_to_file");
|
||||
const std::string& tiedFile = (*m_view->focus())->get_string("get_tied_to_file");
|
||||
|
||||
if (!tiedFile.empty()) {
|
||||
// Move this into core?
|
||||
|
||||
Reference in New Issue
Block a user