summaryrefslogtreecommitdiff
path: root/Userland/Applications/TextEditor
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-03-25 21:41:39 +0100
committerAndreas Kling <kling@serenityos.org>2021-03-25 22:14:09 +0100
commit78b12e1521a5ab4e0a212c0e125b76a813be6f64 (patch)
tree63b47fca86bfba4ef53d62f301856e63f5bb2f28 /Userland/Applications/TextEditor
parentfcc8e3484f9c2312d80063fe8d6251830609385a (diff)
downloadserenity-78b12e1521a5ab4e0a212c0e125b76a813be6f64.zip
Userland: Turn all application menus into window menus :^)
Diffstat (limited to 'Userland/Applications/TextEditor')
-rw-r--r--Userland/Applications/TextEditor/TextEditorWidget.cpp2
-rw-r--r--Userland/Applications/TextEditor/main.cpp4
2 files changed, 4 insertions, 2 deletions
diff --git a/Userland/Applications/TextEditor/TextEditorWidget.cpp b/Userland/Applications/TextEditor/TextEditorWidget.cpp
index 68e78ed189..071076e9f0 100644
--- a/Userland/Applications/TextEditor/TextEditorWidget.cpp
+++ b/Userland/Applications/TextEditor/TextEditorWidget.cpp
@@ -361,7 +361,7 @@ TextEditorWidget::~TextEditorWidget()
void TextEditorWidget::initialize_menubar(GUI::MenuBar& menubar)
{
- auto& app_menu = menubar.add_menu("Text Editor");
+ auto& app_menu = menubar.add_menu("File");
app_menu.add_action(*m_new_action);
app_menu.add_action(*m_open_action);
app_menu.add_action(*m_save_action);
diff --git a/Userland/Applications/TextEditor/main.cpp b/Userland/Applications/TextEditor/main.cpp
index ab72dd97f2..7aa58a7218 100644
--- a/Userland/Applications/TextEditor/main.cpp
+++ b/Userland/Applications/TextEditor/main.cpp
@@ -87,7 +87,7 @@ int main(int argc, char** argv)
auto menubar = GUI::MenuBar::construct();
text_widget.initialize_menubar(menubar);
- app->set_menubar(menubar);
+ window->set_menubar(menubar);
if (file_to_edit)
if (!text_widget.open_file(file_to_edit))
@@ -101,5 +101,7 @@ int main(int argc, char** argv)
window->show();
window->set_icon(app_icon.bitmap_for_size(16));
+ window->set_menubar(menubar);
+
return app->exec();
}