diff options
Diffstat (limited to 'Userland/Libraries/LibGUI/Menubar.cpp')
-rw-r--r-- | Userland/Libraries/LibGUI/Menubar.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGUI/Menubar.cpp b/Userland/Libraries/LibGUI/Menubar.cpp index 587dd229c8..6399d1cf90 100644 --- a/Userland/Libraries/LibGUI/Menubar.cpp +++ b/Userland/Libraries/LibGUI/Menubar.cpp @@ -10,6 +10,12 @@ namespace GUI { +ErrorOr<void> Menubar::try_add_menu(Badge<Window>, NonnullRefPtr<Menu> menu) +{ + TRY(m_menus.try_append(menu)); + return {}; +} + ErrorOr<NonnullRefPtr<Menu>> Menubar::try_add_menu(Badge<Window>, String name) { auto menu = TRY(try_add<Menu>(move(name))); |