From 9fffc1ca149c832dcf721d0de38248bb16528b23 Mon Sep 17 00:00:00 2001 From: Karol Kosek Date: Fri, 8 Jan 2021 17:50:22 +0100 Subject: BrowserTab: add Stop/Refresh action to the menu --- src/browsertab.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/browsertab.cpp') diff --git a/src/browsertab.cpp b/src/browsertab.cpp index f01fd58..829216a 100644 --- a/src/browsertab.cpp +++ b/src/browsertab.cpp @@ -1553,6 +1553,16 @@ void BrowserTab::on_text_browser_customContextMenuRequested(const QPoint pos) }); forward->setEnabled(history.oneForward(current_history_index).isValid()); + if (this->current_handler && this->current_handler->isInProgress()) { + menu.addAction(QIcon::fromTheme("process-stop"), tr("Stop"), [this]() { + this->on_stop_button_clicked(); + }); + } else { + menu.addAction(QIcon::fromTheme("view-refresh"), tr("Refresh"), [this]() { + this->on_refresh_button_clicked(); + }); + } + menu.addSeparator(); } else { menu.addAction("Copy to clipboard", [this]() { -- cgit v1.2.3