mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:27:45 +00:00
Browser: Show status tips for any entered action
This commit is contained in:
parent
7ceb4f5330
commit
679feec195
1 changed files with 3 additions and 14 deletions
|
@ -658,23 +658,12 @@ Web::WebViewHooks& Tab::hooks()
|
||||||
|
|
||||||
void Tab::action_entered(GUI::Action& action)
|
void Tab::action_entered(GUI::Action& action)
|
||||||
{
|
{
|
||||||
m_user_agent_spoof_actions.for_each_action([&](GUI::Action& user_agent_action) {
|
m_statusbar->set_override_text(action.status_tip());
|
||||||
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;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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) {
|
m_statusbar->set_override_text({});
|
||||||
if (&action != &user_agent_action)
|
|
||||||
return IterationDecision::Continue;
|
|
||||||
m_statusbar->set_override_text({});
|
|
||||||
return IterationDecision::Break;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue