summarylogtreecommitdiffstats
path: root/ps-event-view_all.patch
diff options
context:
space:
mode:
Diffstat (limited to 'ps-event-view_all.patch')
-rw-r--r--ps-event-view_all.patch30
1 files changed, 20 insertions, 10 deletions
diff --git a/ps-event-view_all.patch b/ps-event-view_all.patch
index 6d38109c667d..1981d08c03ea 100644
--- a/ps-event-view_all.patch
+++ b/ps-event-view_all.patch
@@ -1,21 +1,31 @@
---- orig-096/src/main.cc 2015-09-03 21:03:30.000000000 +0200
-+++ rtorrent-0.9.6/src/main.cc 2017-04-09 14:47:56.000000000 +0200
-@@ -248,2 +249,5 @@
+--- a/src/main.cc
++++ b/src/main.cc
+@@ -249,6 +249,9 @@ main(int argc, char** argv) {
+
+ rpc::parse_command_multiple
(rpc::make_target(),
+ "method.insert = event.view.hide,multi|rlookup|static\n"
+ "method.insert = event.view.show,multi|rlookup|static\n"
+
"method.insert = event.download.inserted,multi|rlookup|static\n"
---- orig-096/src/ui/element_download_list.cc 2015-09-03 21:03:30.000000000 +0200
-+++ rtorrent-0.9.6/src/ui/element_download_list.cc 2017-04-09 14:51:32.000000000 +0200
-@@ -219,5 +219,10 @@
+ "method.insert = event.download.inserted_new,multi|rlookup|static\n"
+ "method.insert = event.download.inserted_session,multi|rlookup|static\n"
+diff --git a/src/ui/element_download_list.cc b/src/ui/element_download_list.cc
+index 3f34bb9..90a769a 100644
+--- a/src/ui/element_download_list.cc
++++ b/src/ui/element_download_list.cc
+@@ -220,7 +220,14 @@ ElementDownloadList::receive_change_view(const std::string& name) {
+ return;
}
+ std::string old_name = view() ? view()->name() : "";
-+ rpc::commands.call_catch("event.view.hide", rpc::make_target(), name,
-+ "View hide event action failed: ");
++ if (!old_name.empty())
++ rpc::commands.call_catch("event.view.hide", rpc::make_target(), name,
++ "View hide event action failed: ");
set_view(*itr);
-+ rpc::commands.call_catch("event.view.show", rpc::make_target(), old_name,
-+ "View show event action failed: ");
++ if (!old_name.empty())
++ rpc::commands.call_catch("event.view.show", rpc::make_target(), old_name,
++ "View show event action failed: ");
}
+ void