1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 10:37:45 +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:
Kemal Zebari 2022-12-20 23:28:00 -08:00 committed by Sam Atkins
parent abad197884
commit 1dddefa737
6 changed files with 32 additions and 11 deletions

View file

@ -26,12 +26,13 @@ public:
GUI::Model* model() { return m_model.ptr(); }
const GUI::Model* model() const { return m_model.ptr(); }
enum class OpenInNewTab {
Yes,
No
enum class Open {
InNewTab,
InSameTab,
InNewWindow
};
Function<void(DeprecatedString const& url, OpenInNewTab)> on_bookmark_click;
Function<void(DeprecatedString const& url, Open)> on_bookmark_click;
Function<void(DeprecatedString const&, DeprecatedString const&)> on_bookmark_hover;
bool contains_bookmark(DeprecatedString const& url);