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:
parent
4d50398f02
commit
c9059c12dc
5 changed files with 90 additions and 2 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue