1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:07:36 +00:00

Browser: Let the user add/remove bookmarks to the bookmarks bar

This patchset adds a Button to the toolbar (right next to the location field)
with a star icon. The star is white if the currently visited url is not yet
bookmarked and yellow if a bookmark for the url exists.

After adding or removing a bookmark, the bookmark json file is synced to disk.
Therefore, some new pledge/unveil's have been added.
This commit is contained in:
Emanuel Sprung 2020-03-26 20:06:23 +01:00 committed by Andreas Kling
parent 4d50398f02
commit c9059c12dc
5 changed files with 90 additions and 2 deletions

View file

@ -41,6 +41,10 @@ public:
Function<void(const String&, const String&)> on_bookmark_click;
Function<void(const String&, const String&)> on_bookmark_hover;
bool contains_bookmark(const String& url);
bool remove_bookmark(const String& url);
bool add_bookmark(const String& url, const String& title);
private:
BookmarksBarWidget(const String&, bool enabled);