diff options
author | Alexander Batischev <eual.jp@gmail.com> | 2017-09-04 22:59:45 +0300 |
---|---|---|
committer | Alexander Batischev <eual.jp@gmail.com> | 2017-09-04 22:59:45 +0300 |
commit | 04ca717977f37ab0c3da5bd5d7b5524e69eb4abe (patch) | |
tree | 9f7ee3d2e013e1017ccf9902aa803929b5276a39 | |
parent | 4fe54cc292ddd860ba7d83c4795f09026a765277 (diff) |
Revert "intercept browser's failure (issue #448) (#592)"
This reverts commit e0f91006378a45c8ae1c9c89572fecf23f91af37.
-rw-r--r-- | include/view.h | 2 | ||||
-rw-r--r-- | src/itemlist_formaction.cpp | 9 | ||||
-rw-r--r-- | src/view.cpp | 10 |
3 files changed, 4 insertions, 17 deletions
diff --git a/include/view.h b/include/view.h index fdf0349d..714e6f42 100644 --- a/include/view.h +++ b/include/view.h @@ -67,7 +67,7 @@ class view { std::string select_tag(); std::string select_filter(const std::vector<filter_name_expr_pair>& filters); - bool open_in_browser(const std::string& url); + void open_in_browser(const std::string& url); void open_in_pager(const std::string& filename); std::string get_filename_suggestion(const std::string& s); diff --git a/src/itemlist_formaction.cpp b/src/itemlist_formaction.cpp index 8869f315..8d295762 100644 --- a/src/itemlist_formaction.cpp +++ b/src/itemlist_formaction.cpp @@ -84,16 +84,9 @@ void itemlist_formaction::process_operation(operation op, bool automatic, std::v LOG(level::INFO, "itemlist_formaction: opening item at pos `%s'", itemposname); if (itemposname.length() > 0 && visible_items.size() != 0) { if (itempos < visible_items.size()) { - - bool browser_success = v->open_in_browser(visible_items[itempos].first->link()); - if (!browser_success) { - v->show_error(_("Browser failed to open the link!")); - break; - } - visible_items[itempos].first->set_unread(false); v->get_ctrl()->mark_article_read(visible_items[itempos].first->guid(), true); - + v->open_in_browser(visible_items[itempos].first->link()); if (!v->get_cfg()->get_configvalue_as_bool("openbrowser-and-mark-jumps-to-next-unread")) { if (itempos < visible_items.size()-1) { f->set("itempos", strprintf::fmt("%u", itempos + 1)); diff --git a/src/view.cpp b/src/view.cpp index 1ae5c0b9..8745c52d 100644 --- a/src/view.cpp +++ b/src/view.cpp @@ -336,7 +336,7 @@ void view::open_in_pager(const std::string& filename) { pop_current_formaction(); } -bool view::open_in_browser(const std::string& url) { +void view::open_in_browser(const std::string& url) { formaction_stack.push_back(std::shared_ptr<formaction>()); current_formaction = formaction_stack_size() - 1; std::string cmdline; @@ -359,14 +359,8 @@ bool view::open_in_browser(const std::string& url) { cmdline.append("'"); } stfl::reset(); - int browser_exit_code = utils::run_interactively(cmdline, "view::open_in_browser"); - if (browser_exit_code != 0) { - LOG(level::DEBUG, "utils::run_interactively: " - "Starting the browser failed with error code %d - command was %s", browser_exit_code, cmdline); - } + utils::run_interactively(cmdline, "view::open_in_browser"); pop_current_formaction(); - - return browser_exit_code == 0; } void view::update_visible_feeds(std::vector<std::shared_ptr<rss_feed>> feeds) { |