mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-09 09:34:57 +09:00
Browser: Move BookmarksBarWidget::PerformEditOn
to anon namespace
Since none of `BookmarksBarWidget`'s methods use this enum class any longer, let's just move it to the anonymous namespace so that `BookmarkEditor` can still make use of it.
This commit is contained in:
parent
bd1e76a98a
commit
6b5a0100d9
Notes:
sideshowbarker
2024-07-17 00:49:59 +09:00
Author: https://github.com/kemzeb
Commit: 6b5a0100d9
Pull-request: https://github.com/SerenityOS/serenity/pull/21940
Reviewed-by: https://github.com/ADKaster ✅
2 changed files with 7 additions and 7 deletions
|
@ -27,15 +27,20 @@ namespace Browser {
|
|||
|
||||
namespace {
|
||||
|
||||
enum class PerformEditOn {
|
||||
NewBookmark,
|
||||
ExistingBookmark
|
||||
};
|
||||
|
||||
class BookmarkEditor final : public GUI::Dialog {
|
||||
C_OBJECT(BookmarkEditor)
|
||||
|
||||
public:
|
||||
static Vector<JsonValue>
|
||||
edit_bookmark(Window* parent_window, StringView title, StringView url, BookmarksBarWidget::PerformEditOn perform_edit_on)
|
||||
edit_bookmark(Window* parent_window, StringView title, StringView url, PerformEditOn perform_edit_on)
|
||||
{
|
||||
auto editor = BookmarkEditor::construct(parent_window, title, url);
|
||||
if (perform_edit_on == BookmarksBarWidget::PerformEditOn::NewBookmark) {
|
||||
if (perform_edit_on == PerformEditOn::NewBookmark) {
|
||||
editor->set_title("Add Bookmark");
|
||||
} else {
|
||||
editor->set_title("Edit Bookmark");
|
||||
|
|
|
@ -32,11 +32,6 @@ public:
|
|||
InNewWindow
|
||||
};
|
||||
|
||||
enum class PerformEditOn {
|
||||
NewBookmark,
|
||||
ExistingBookmark
|
||||
};
|
||||
|
||||
Function<void(DeprecatedString const& url, Open)> on_bookmark_click;
|
||||
Function<void(DeprecatedString const&, DeprecatedString const&)> on_bookmark_hover;
|
||||
Function<void()> on_bookmark_change;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue