TextEditor: Move all "File" menu entries into the app menu instead

It felt weird to have both the app menu *and* a "File" menu.
This commit is contained in:
Andreas Kling 2019-08-26 17:59:05 +02:00
parent dde10f534f
commit cef2c04952
Notes: sideshowbarker 2024-07-19 12:30:34 +09:00

View file

@ -153,19 +153,19 @@ TextEditorWidget::TextEditorWidget()
auto menubar = make<GMenuBar>();
auto app_menu = make<GMenu>("Text Editor");
app_menu->add_action(*m_new_action);
app_menu->add_action(*m_open_action);
app_menu->add_action(*m_save_action);
app_menu->add_action(*m_save_as_action);
app_menu->add_separator();
app_menu->add_action(*m_line_wrapping_setting_action);
app_menu->add_separator();
app_menu->add_action(GAction::create("Quit", { Mod_Alt, Key_F4 }, [](const GAction&) {
GApplication::the().quit(0);
return;
}));
menubar->add_menu(move(app_menu));
auto file_menu = make<GMenu>("File");
file_menu->add_action(*m_new_action);
file_menu->add_action(*m_open_action);
file_menu->add_action(*m_save_action);
file_menu->add_action(*m_save_as_action);
menubar->add_menu(move(file_menu));
auto edit_menu = make<GMenu>("Edit");
edit_menu->add_action(m_editor->undo_action());