summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/controller.cpp11
-rw-r--r--src/itemview_formaction.cpp3
-rw-r--r--src/pb_controller.cpp7
-rw-r--r--src/urlview_formaction.cpp2
-rw-r--r--src/utils.cpp7
5 files changed, 18 insertions, 12 deletions
diff --git a/src/controller.cpp b/src/controller.cpp
index e8e065e7..53b6dbe8 100644
--- a/src/controller.cpp
+++ b/src/controller.cpp
@@ -1317,12 +1317,11 @@ void controller::edit_urls_file() {
v->push_empty_formaction();
stfl::reset();
- /* Most editors check for unsaved changes when attempting to exit and
- * prompt to either save or discard them. If save was choosen without
- * having write permissions a properly codd will fail and stay open
- * (like vim, nano, gedit, geany). However other editors (texmaker
- * 5.0.1 and notepadqq 1.0.1) close but despite return 0.
- * So we should not check this particular exit code.
+ /* We should not check this particular exit code.
+ * Editors usually fail when closing+saving (and stay open).
+ * (tested with vim, nano, gedit, geany)
+ * (texmaker 5.0.1 and notepadqq 1.0.1 close without neither showing an
+ * error nor saving but despite return 0)
*/
int unused __attribute__((unused));
unused = utils::run_interactively(cmdline, "controller::edit_urls_file");
diff --git a/src/itemview_formaction.cpp b/src/itemview_formaction.cpp
index 53f6d5ea..96062999 100644
--- a/src/itemview_formaction.cpp
+++ b/src/itemview_formaction.cpp
@@ -214,6 +214,7 @@ void itemview_formaction::process_operation(operation op, bool automatic, std::v
if (!v->open_in_browser(item->link())) {
v->show_error(_("Browser failed to open the link!"));
}
+ v->set_status("");
break;
case OP_BOOKMARK:
if (automatic) {
@@ -374,6 +375,7 @@ void itemview_formaction::process_operation(operation op, bool automatic, std::v
if (!v->open_in_browser(links[idx].first)) {
v->show_error(_("Browser failed to open the link!"));
}
+ v->set_status("");
}
}
break;
@@ -523,6 +525,7 @@ void itemview_formaction::finished_qna(operation op) {
if (!v->open_in_browser(links[idx-1].first)) {
v->show_error(_("Browser failed to open the link!"));
}
+ v->set_status("");
}
}
break;
diff --git a/src/pb_controller.cpp b/src/pb_controller.cpp
index c65e95de..b95c18e9 100644
--- a/src/pb_controller.cpp
+++ b/src/pb_controller.cpp
@@ -371,10 +371,9 @@ void pb_controller::play_file(const std::string& file) {
cmdline.append(utils::replace_all(file,"\"", "\\\""));
cmdline.append("\"");
stfl::reset();
- int player_exit_code = utils::run_interactively(cmdline, "pb_controller::play_file");
- if (player_exit_code != 0) {
- v->dllist_form.set("msg", _("The player failed!"));
- }
+ // Is the following exit code important?
+ int unused __attribute__((unused));
+ unused = utils::run_interactively(cmdline, "pb_controller::play_file");
}
diff --git a/src/urlview_formaction.cpp b/src/urlview_formaction.cpp
index 60942d07..7a2a9fda 100644
--- a/src/urlview_formaction.cpp
+++ b/src/urlview_formaction.cpp
@@ -33,6 +33,7 @@ void urlview_formaction::process_operation(operation op, bool /* automatic */, s
if (!v->open_in_browser(links[idx].first)) {
v->show_error(_("Browser failed to open the link!"));
}
+ v->set_status("");
} else {
v->show_error(_("No link selected!"));
}
@@ -67,6 +68,7 @@ void urlview_formaction::process_operation(operation op, bool /* automatic */, s
if (!v->open_in_browser(links[idx].first)) {
v->show_error(_("Browser failed to open the link!"));
}
+ v->set_status("");
}
}
break;
diff --git a/src/utils.cpp b/src/utils.cpp
index 47aeefbd..4f8bfed0 100644
--- a/src/utils.cpp
+++ b/src/utils.cpp
@@ -1101,9 +1101,12 @@ int utils::run_interactively(
LOG(level::DEBUG, "%s: couldn't create a child process", caller);
} else if (status == 127) {
LOG(level::DEBUG, "%s: couldn't run shell", caller);
- } else if (status != 0) {
- LOG(level::DEBUG, "%s: cmd = %s, returned %d", caller, command, status);
}
+ if (status != 0) {
+ LOG(level::DEBUG, "utils::run_interactively: "
+ "%s: cmd = %s, returned %d", caller, command, status);
+ }
+
return status;
}