summaryrefslogtreecommitdiff
path: root/Userland/Applications/Mail
diff options
context:
space:
mode:
authorsin-ack <sin-ack@users.noreply.github.com>2021-07-29 10:08:34 +0000
committerAndreas Kling <kling@serenityos.org>2021-08-02 00:39:15 +0200
commit95ab61e3db7b26380adaa84cc2473bc62a186e33 (patch)
tree31a73ef0b3907bea1b4d6a4ef32b695bb11e589a /Userland/Applications/Mail
parenta0d7640e034a5ce0dc6efabceac48d28780bc86d (diff)
downloadserenity-95ab61e3db7b26380adaa84cc2473bc62a186e33.zip
Mail: Use Window::add_menu instead of Menubar::add_menu
Window::add_menu is the canonical way of adding menus to a window.
Diffstat (limited to 'Userland/Applications/Mail')
-rw-r--r--Userland/Applications/Mail/main.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/Userland/Applications/Mail/main.cpp b/Userland/Applications/Mail/main.cpp
index a9ade0a6fd..4532de314b 100644
--- a/Userland/Applications/Mail/main.cpp
+++ b/Userland/Applications/Mail/main.cpp
@@ -32,16 +32,14 @@ int main(int argc, char** argv)
window->set_title("Mail");
window->resize(640, 400);
- auto menubar = GUI::Menubar::construct();
-
- auto& file_menu = menubar->add_menu("&File");
+ auto& file_menu = window->add_menu("&File");
file_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) {
mail_widget.on_window_close();
app->quit();
}));
- auto& help_menu = menubar->add_menu("&Help");
+ auto& help_menu = window->add_menu("&Help");
help_menu.add_action(GUI::CommonActions::make_about_action("Mail", app_icon, window));
window->on_close_request = [&] {
@@ -49,8 +47,6 @@ int main(int argc, char** argv)
return GUI::Window::CloseRequestDecision::Close;
};
- window->set_menubar(menubar);
-
window->show();
bool should_continue = mail_widget.connect_and_login();