1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 07:17:34 +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:
networkException 2022-07-10 16:29:35 +02:00 committed by Andreas Kling
parent f9212ac02e
commit 5c1f1209fc
3 changed files with 12 additions and 7 deletions

View file

@ -26,7 +26,12 @@ public:
GUI::Model* model() { return m_model.ptr(); }
const GUI::Model* model() const { return m_model.ptr(); }
Function<void(String const& url, unsigned modifiers)> on_bookmark_click;
enum class OpenInNewTab {
Yes,
No
};
Function<void(String const& url, OpenInNewTab)> on_bookmark_click;
Function<void(String const&, String const&)> on_bookmark_hover;
bool contains_bookmark(String const& url);