From 679feec1958ddae7c7abbbd080dfd50347dd1383 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 18 Apr 2021 00:43:04 +0200 Subject: [PATCH] Browser: Show status tips for any entered action --- Userland/Applications/Browser/Tab.cpp | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/Userland/Applications/Browser/Tab.cpp b/Userland/Applications/Browser/Tab.cpp index 28c9231064..878bd25b57 100644 --- a/Userland/Applications/Browser/Tab.cpp +++ b/Userland/Applications/Browser/Tab.cpp @@ -658,23 +658,12 @@ Web::WebViewHooks& Tab::hooks() void Tab::action_entered(GUI::Action& action) { - m_user_agent_spoof_actions.for_each_action([&](GUI::Action& user_agent_action) { - if (&action != &user_agent_action) - return IterationDecision::Continue; - if (!user_agent_action.status_tip().is_empty()) - m_statusbar->set_override_text(user_agent_action.status_tip()); - return IterationDecision::Break; - }); + m_statusbar->set_override_text(action.status_tip()); } -void Tab::action_left(GUI::Action& action) +void Tab::action_left(GUI::Action&) { - m_user_agent_spoof_actions.for_each_action([&](auto& user_agent_action) { - if (&action != &user_agent_action) - return IterationDecision::Continue; - m_statusbar->set_override_text({}); - return IterationDecision::Break; - }); + m_statusbar->set_override_text({}); } }