mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:17:34 +00:00
Browser: Introduce action for opening bookmarks in a new window
This change introduces an action to bookmarks that allows them to be opened in a new browser window. This is done by accessing any bookmark's context menu and pressing "Open in New Window".
This commit is contained in:
parent
abad197884
commit
1dddefa737
6 changed files with 32 additions and 11 deletions
|
@ -580,9 +580,11 @@ void Tab::update_bookmark_button(DeprecatedString const& url)
|
|||
|
||||
void Tab::did_become_active()
|
||||
{
|
||||
BookmarksBarWidget::the().on_bookmark_click = [this](auto& url, auto open_in_new_tab) {
|
||||
if (open_in_new_tab == BookmarksBarWidget::OpenInNewTab::Yes)
|
||||
BookmarksBarWidget::the().on_bookmark_click = [this](auto& url, auto open) {
|
||||
if (open == BookmarksBarWidget::Open::InNewTab)
|
||||
on_tab_open_request(url);
|
||||
else if (open == BookmarksBarWidget::Open::InNewWindow)
|
||||
on_window_open_request(url);
|
||||
else
|
||||
load(url);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue