mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:27:45 +00: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
2 changed files with 7 additions and 7 deletions
|
@ -27,15 +27,20 @@ namespace Browser {
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
enum class PerformEditOn {
|
||||||
|
NewBookmark,
|
||||||
|
ExistingBookmark
|
||||||
|
};
|
||||||
|
|
||||||
class BookmarkEditor final : public GUI::Dialog {
|
class BookmarkEditor final : public GUI::Dialog {
|
||||||
C_OBJECT(BookmarkEditor)
|
C_OBJECT(BookmarkEditor)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static Vector<JsonValue>
|
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);
|
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");
|
editor->set_title("Add Bookmark");
|
||||||
} else {
|
} else {
|
||||||
editor->set_title("Edit Bookmark");
|
editor->set_title("Edit Bookmark");
|
||||||
|
|
|
@ -32,11 +32,6 @@ public:
|
||||||
InNewWindow
|
InNewWindow
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class PerformEditOn {
|
|
||||||
NewBookmark,
|
|
||||||
ExistingBookmark
|
|
||||||
};
|
|
||||||
|
|
||||||
Function<void(DeprecatedString const& url, Open)> on_bookmark_click;
|
Function<void(DeprecatedString const& url, Open)> on_bookmark_click;
|
||||||
Function<void(DeprecatedString const&, DeprecatedString const&)> on_bookmark_hover;
|
Function<void(DeprecatedString const&, DeprecatedString const&)> on_bookmark_hover;
|
||||||
Function<void()> on_bookmark_change;
|
Function<void()> on_bookmark_change;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue