mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:17:35 +00:00
Browser: Use OpenInNewTab parameter in on_bookmark_click handler
This patch makes the function signature of the on_bookmark_click handler more readable by replacing `Mod_None` with `OpenInNewTab::No` and `Mod_Ctrl` with `OpenInNewTab::Yes`.
This commit is contained in:
parent
f9212ac02e
commit
5c1f1209fc
3 changed files with 12 additions and 7 deletions
|
@ -484,8 +484,8 @@ void Tab::update_bookmark_button(String const& url)
|
|||
|
||||
void Tab::did_become_active()
|
||||
{
|
||||
BookmarksBarWidget::the().on_bookmark_click = [this](auto& url, unsigned modifiers) {
|
||||
if (modifiers & Mod_Ctrl)
|
||||
BookmarksBarWidget::the().on_bookmark_click = [this](auto& url, auto open_in_new_tab) {
|
||||
if (open_in_new_tab == BookmarksBarWidget::OpenInNewTab::Yes)
|
||||
on_tab_open_request(url);
|
||||
else
|
||||
load(url);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue