diff options
author | Andreas Kling <kling@serenityos.org> | 2021-05-01 10:45:39 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-05-01 17:40:54 +0200 |
commit | 4b0098e52f860ac346c42ba8a3bfdebf1de37f56 (patch) | |
tree | b477de65ad7fc15a707dad93a0b8ead992bfda5b | |
parent | b119fa5a0a6c12877d90f947849d6db0ae426187 (diff) | |
download | serenity-4b0098e52f860ac346c42ba8a3bfdebf1de37f56.zip |
Everywhere: Rename app_menu to file_menu or game_menu
34 files changed, 140 insertions, 142 deletions
diff --git a/Userland/Applications/Browser/Tab.cpp b/Userland/Applications/Browser/Tab.cpp index 795cd527f1..011ecf2801 100644 --- a/Userland/Applications/Browser/Tab.cpp +++ b/Userland/Applications/Browser/Tab.cpp @@ -286,8 +286,8 @@ Tab::Tab(Type type) m_menubar = GUI::Menubar::construct(); - auto& app_menu = m_menubar->add_menu("&File"); - app_menu.add_action(WindowActions::the().create_new_tab_action()); + auto& file_menu = m_menubar->add_menu("&File"); + file_menu.add_action(WindowActions::the().create_new_tab_action()); auto close_tab_action = GUI::Action::create( "&Close Tab", { Mod_Ctrl, Key_W }, Gfx::Bitmap::load_from_file("/res/icons/16x16/close-tab.png"), [this](auto&) { @@ -295,10 +295,10 @@ Tab::Tab(Type type) }, this); close_tab_action->set_status_tip("Close current tab"); - app_menu.add_action(close_tab_action); + file_menu.add_action(close_tab_action); - app_menu.add_separator(); - app_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) { + file_menu.add_separator(); + file_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) { GUI::Application::the()->quit(); })); diff --git a/Userland/Applications/Calculator/main.cpp b/Userland/Applications/Calculator/main.cpp index 9a1d5d9473..1bf55d49a2 100644 --- a/Userland/Applications/Calculator/main.cpp +++ b/Userland/Applications/Calculator/main.cpp @@ -51,8 +51,8 @@ int main(int argc, char** argv) auto menubar = GUI::Menubar::construct(); - auto& app_menu = menubar->add_menu("&File"); - app_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) { + auto& file_menu = menubar->add_menu("&File"); + file_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) { GUI::Application::the()->quit(); })); diff --git a/Userland/Applications/Calendar/main.cpp b/Userland/Applications/Calendar/main.cpp index 03f4b2c620..19abd6d384 100644 --- a/Userland/Applications/Calendar/main.cpp +++ b/Userland/Applications/Calendar/main.cpp @@ -127,16 +127,15 @@ int main(int argc, char** argv) }; auto menubar = GUI::Menubar::construct(); - auto& app_menu = menubar->add_menu("&File"); - app_menu.add_action(GUI::Action::create("&Add Event", { Mod_Ctrl | Mod_Shift, Key_E }, Gfx::Bitmap::load_from_file("/res/icons/16x16/add-event.png"), + auto& file_menu = menubar->add_menu("&File"); + file_menu.add_action(GUI::Action::create("&Add Event", { Mod_Ctrl | Mod_Shift, Key_E }, Gfx::Bitmap::load_from_file("/res/icons/16x16/add-event.png"), [&](const GUI::Action&) { AddEventDialog::show(calendar->selected_date(), window); - return; })); - app_menu.add_separator(); + file_menu.add_separator(); - app_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) { + file_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) { GUI::Application::the()->quit(); })); diff --git a/Userland/Applications/DisplaySettings/main.cpp b/Userland/Applications/DisplaySettings/main.cpp index cfafbdc3c9..9ac238066b 100644 --- a/Userland/Applications/DisplaySettings/main.cpp +++ b/Userland/Applications/DisplaySettings/main.cpp @@ -48,8 +48,8 @@ int main(int argc, char** argv) auto menubar = GUI::Menubar::construct(); - auto& app_menu = menubar->add_menu("File"); - app_menu.add_action(GUI::CommonActions::make_quit_action([&](const GUI::Action&) { + auto& file_menu = menubar->add_menu("File"); + file_menu.add_action(GUI::CommonActions::make_quit_action([&](const GUI::Action&) { app->quit(); })); diff --git a/Userland/Applications/FileManager/main.cpp b/Userland/Applications/FileManager/main.cpp index b496b8ab90..75524f3b5b 100644 --- a/Userland/Applications/FileManager/main.cpp +++ b/Userland/Applications/FileManager/main.cpp @@ -802,18 +802,18 @@ int run_in_windowed_mode(RefPtr<Core::ConfigFile> config, String initial_locatio auto menubar = GUI::Menubar::construct(); - auto& app_menu = menubar->add_menu("&File"); - app_menu.add_action(mkdir_action); - app_menu.add_action(touch_action); - app_menu.add_action(copy_action); - app_menu.add_action(cut_action); - app_menu.add_action(paste_action); - app_menu.add_action(focus_dependent_delete_action); - app_menu.add_action(directory_view.open_terminal_action()); - app_menu.add_separator(); - app_menu.add_action(properties_action); - app_menu.add_separator(); - app_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) { + auto& file_menu = menubar->add_menu("&File"); + file_menu.add_action(mkdir_action); + file_menu.add_action(touch_action); + file_menu.add_action(copy_action); + file_menu.add_action(cut_action); + file_menu.add_action(paste_action); + file_menu.add_action(focus_dependent_delete_action); + file_menu.add_action(directory_view.open_terminal_action()); + file_menu.add_separator(); + file_menu.add_action(properties_action); + file_menu.add_separator(); + file_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) { GUI::Application::the()->quit(); })); diff --git a/Userland/Applications/FontEditor/FontEditor.cpp b/Userland/Applications/FontEditor/FontEditor.cpp index db486e1c9a..338f08796b 100644 --- a/Userland/Applications/FontEditor/FontEditor.cpp +++ b/Userland/Applications/FontEditor/FontEditor.cpp @@ -531,13 +531,13 @@ void FontEditorWidget::initialize(const String& path, RefPtr<Gfx::BitmapFont>&& void FontEditorWidget::initialize_menubar(GUI::Menubar& menubar) { - 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); - app_menu.add_action(*m_save_as_action); - app_menu.add_separator(); - app_menu.add_action(GUI::CommonActions::make_quit_action([this](auto&) { + auto& file_menu = menubar.add_menu("&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); + file_menu.add_separator(); + file_menu.add_action(GUI::CommonActions::make_quit_action([this](auto&) { if (!request_close()) return; GUI::Application::the()->quit(); diff --git a/Userland/Applications/Help/main.cpp b/Userland/Applications/Help/main.cpp index f8438acfc9..74e2f1a14a 100644 --- a/Userland/Applications/Help/main.cpp +++ b/Userland/Applications/Help/main.cpp @@ -256,10 +256,10 @@ int main(int argc, char* argv[]) auto menubar = GUI::Menubar::construct(); - auto& app_menu = menubar->add_menu("File"); - app_menu.add_action(GUI::CommonActions::make_about_action("Help", app_icon, window)); - app_menu.add_separator(); - app_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) { + auto& file_menu = menubar->add_menu("&File"); + file_menu.add_action(GUI::CommonActions::make_about_action("&Help", app_icon, window)); + file_menu.add_separator(); + file_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) { GUI::Application::the()->quit(); })); diff --git a/Userland/Applications/HexEditor/HexEditorWidget.cpp b/Userland/Applications/HexEditor/HexEditorWidget.cpp index 78905efffd..2ca6263339 100644 --- a/Userland/Applications/HexEditor/HexEditorWidget.cpp +++ b/Userland/Applications/HexEditor/HexEditorWidget.cpp @@ -117,13 +117,13 @@ HexEditorWidget::~HexEditorWidget() void HexEditorWidget::initialize_menubar(GUI::Menubar& menubar) { - 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); - app_menu.add_action(*m_save_as_action); - app_menu.add_separator(); - app_menu.add_action(GUI::CommonActions::make_quit_action([this](auto&) { + auto& file_menu = menubar.add_menu("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); + file_menu.add_separator(); + file_menu.add_action(GUI::CommonActions::make_quit_action([this](auto&) { if (!request_close()) return; GUI::Application::the()->quit(); diff --git a/Userland/Applications/IRCClient/IRCAppWindow.cpp b/Userland/Applications/IRCClient/IRCAppWindow.cpp index 8ebcea8e12..625c8a7183 100644 --- a/Userland/Applications/IRCClient/IRCAppWindow.cpp +++ b/Userland/Applications/IRCClient/IRCAppWindow.cpp @@ -238,8 +238,8 @@ void IRCAppWindow::setup_actions() void IRCAppWindow::setup_menus() { auto menubar = GUI::Menubar::construct(); - auto& app_menu = menubar->add_menu("File"); - app_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) { + auto& file_menu = menubar->add_menu("File"); + file_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) { dbgln("Terminal: Quit menu activated!"); GUI::Application::the()->quit(); return; diff --git a/Userland/Applications/KeyboardMapper/main.cpp b/Userland/Applications/KeyboardMapper/main.cpp index ccda6b0d93..086a5408b5 100644 --- a/Userland/Applications/KeyboardMapper/main.cpp +++ b/Userland/Applications/KeyboardMapper/main.cpp @@ -86,12 +86,12 @@ int main(int argc, char** argv) // Menu auto menubar = GUI::Menubar::construct(); - auto& app_menu = menubar->add_menu("File"); - app_menu.add_action(open_action); - app_menu.add_action(save_action); - app_menu.add_action(save_as_action); - app_menu.add_separator(); - app_menu.add_action(quit_action); + auto& file_menu = menubar->add_menu("&File"); + file_menu.add_action(open_action); + file_menu.add_action(save_action); + file_menu.add_action(save_as_action); + file_menu.add_separator(); + file_menu.add_action(quit_action); auto& help_menu = menubar->add_menu("Help"); help_menu.add_action(GUI::CommonActions::make_about_action("Keyboard Mapper", app_icon, window)); diff --git a/Userland/Applications/KeyboardSettings/main.cpp b/Userland/Applications/KeyboardSettings/main.cpp index 9f3dae993e..29de7feb79 100644 --- a/Userland/Applications/KeyboardSettings/main.cpp +++ b/Userland/Applications/KeyboardSettings/main.cpp @@ -168,8 +168,8 @@ int main(int argc, char** argv) auto menubar = GUI::Menubar::construct(); - auto& app_menu = menubar->add_menu("File"); - app_menu.add_action(quit_action); + auto& file_menu = menubar->add_menu("File"); + file_menu.add_action(quit_action); auto& help_menu = menubar->add_menu("Help"); help_menu.add_action(GUI::CommonActions::make_about_action("Keyboard Settings", app_icon, window)); diff --git a/Userland/Applications/MouseSettings/main.cpp b/Userland/Applications/MouseSettings/main.cpp index 7bdb6c612e..9af79afc6a 100644 --- a/Userland/Applications/MouseSettings/main.cpp +++ b/Userland/Applications/MouseSettings/main.cpp @@ -37,8 +37,8 @@ int main(int argc, char** argv) window->set_icon(app_icon.bitmap_for_size(16)); auto menubar = GUI::Menubar::construct(); - auto& app_menu = menubar->add_menu("File"); - app_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) { + auto& file_menu = menubar->add_menu("File"); + file_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); })); diff --git a/Userland/Applications/Piano/main.cpp b/Userland/Applications/Piano/main.cpp index 2bea8731d3..da9af630e1 100644 --- a/Userland/Applications/Piano/main.cpp +++ b/Userland/Applications/Piano/main.cpp @@ -91,8 +91,8 @@ int main(int argc, char** argv) auto menubar = GUI::Menubar::construct(); - auto& app_menu = menubar->add_menu("File"); - app_menu.add_action(GUI::Action::create("Export", { Mod_Ctrl, Key_E }, [&](const GUI::Action&) { + auto& file_menu = menubar->add_menu("File"); + file_menu.add_action(GUI::Action::create("Export", { Mod_Ctrl, Key_E }, [&](const GUI::Action&) { save_path = GUI::FilePicker::get_save_filepath(window, "Untitled", "wav"); if (!save_path.has_value()) return; @@ -104,8 +104,8 @@ int main(int argc, char** argv) } need_to_write_wav = true; })); - app_menu.add_separator(); - app_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) { + file_menu.add_separator(); + file_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) { GUI::Application::the()->quit(); return; })); diff --git a/Userland/Applications/QuickShow/main.cpp b/Userland/Applications/QuickShow/main.cpp index 4f1b3aad56..95e1cfbec3 100644 --- a/Userland/Applications/QuickShow/main.cpp +++ b/Userland/Applications/QuickShow/main.cpp @@ -252,11 +252,11 @@ int main(int argc, char** argv) auto menubar = GUI::Menubar::construct(); - auto& app_menu = menubar->add_menu("&File"); - app_menu.add_action(open_action); - app_menu.add_action(delete_action); - app_menu.add_separator(); - app_menu.add_action(quit_action); + auto& file_menu = menubar->add_menu("&File"); + file_menu.add_action(open_action); + file_menu.add_action(delete_action); + file_menu.add_separator(); + file_menu.add_action(quit_action); auto& image_menu = menubar->add_menu("&Image"); image_menu.add_action(rotate_left_action); diff --git a/Userland/Applications/SoundPlayer/main.cpp b/Userland/Applications/SoundPlayer/main.cpp index 59aeacffe0..ce95f7c125 100644 --- a/Userland/Applications/SoundPlayer/main.cpp +++ b/Userland/Applications/SoundPlayer/main.cpp @@ -60,7 +60,7 @@ int main(int argc, char** argv) auto menubar = GUI::Menubar::construct(); - auto& app_menu = menubar->add_menu("File"); + auto& file_menu = menubar->add_menu("&File"); auto& playlist_menu = menubar->add_menu("Playlist"); @@ -71,7 +71,7 @@ int main(int argc, char** argv) player->open_file(path); } - app_menu.add_action(GUI::CommonActions::make_open_action([&](auto&) { + file_menu.add_action(GUI::CommonActions::make_open_action([&](auto&) { Optional<String> path = GUI::FilePicker::get_open_filepath(window, "Open sound file..."); if (path.has_value()) { player->open_file(path.value()); @@ -81,7 +81,7 @@ int main(int argc, char** argv) auto linear_volume_slider = GUI::Action::create_checkable("Nonlinear volume slider", [&](auto& action) { static_cast<SoundPlayerWidgetAdvancedView*>(player)->set_nonlinear_volume_slider(action.is_checked()); }); - app_menu.add_action(linear_volume_slider); + file_menu.add_action(linear_volume_slider); auto playlist_toggle = GUI::Action::create_checkable("Show playlist", [&](auto& action) { static_cast<SoundPlayerWidgetAdvancedView*>(player)->set_playlist_visible(action.is_checked()); @@ -96,8 +96,8 @@ int main(int argc, char** argv) }); playlist_menu.add_action(playlist_loop_toggle); - app_menu.add_separator(); - app_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) { + file_menu.add_separator(); + file_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); })); diff --git a/Userland/Applications/SpaceAnalyzer/main.cpp b/Userland/Applications/SpaceAnalyzer/main.cpp index c28f0da7fe..6561306f0b 100644 --- a/Userland/Applications/SpaceAnalyzer/main.cpp +++ b/Userland/Applications/SpaceAnalyzer/main.cpp @@ -271,11 +271,11 @@ int main(int argc, char* argv[]) // Configure the menubar. auto menubar = GUI::Menubar::construct(); - auto& app_menu = menubar->add_menu("File"); - app_menu.add_action(GUI::Action::create("Analyze", [&](auto&) { + auto& file_menu = menubar->add_menu("&File"); + file_menu.add_action(GUI::Action::create("&Analyze", [&](auto&) { analyze(tree, treemapwidget, statusbar); })); - app_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) { + file_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); })); auto& help_menu = menubar->add_menu("Help"); diff --git a/Userland/Applications/Spreadsheet/main.cpp b/Userland/Applications/Spreadsheet/main.cpp index b227f0311b..00a546b5a0 100644 --- a/Userland/Applications/Spreadsheet/main.cpp +++ b/Userland/Applications/Spreadsheet/main.cpp @@ -91,12 +91,12 @@ int main(int argc, char* argv[]) spreadsheet_widget.load(filename); auto menubar = GUI::Menubar::construct(); - auto& app_menu = menubar->add_menu("File"); + auto& file_menu = menubar->add_menu("&File"); - app_menu.add_action(GUI::Action::create("Add New Sheet", Gfx::Bitmap::load_from_file("/res/icons/16x16/new-tab.png"), [&](auto&) { + file_menu.add_action(GUI::Action::create("Add New Sheet", Gfx::Bitmap::load_from_file("/res/icons/16x16/new-tab.png"), [&](auto&) { spreadsheet_widget.add_sheet(); })); - app_menu.add_action(GUI::CommonActions::make_open_action([&](auto&) { + file_menu.add_action(GUI::CommonActions::make_open_action([&](auto&) { Optional<String> load_path = GUI::FilePicker::get_open_filepath(window); if (!load_path.has_value()) return; @@ -104,7 +104,7 @@ int main(int argc, char* argv[]) spreadsheet_widget.load(load_path.value()); })); - app_menu.add_action(GUI::CommonActions::make_save_action([&](auto&) { + file_menu.add_action(GUI::CommonActions::make_save_action([&](auto&) { if (spreadsheet_widget.current_filename().is_empty()) { String name = "workbook"; Optional<String> save_path = GUI::FilePicker::get_save_filepath(window, name, "sheets"); @@ -117,7 +117,7 @@ int main(int argc, char* argv[]) } })); - app_menu.add_action(GUI::CommonActions::make_save_as_action([&](auto&) { + file_menu.add_action(GUI::CommonActions::make_save_as_action([&](auto&) { auto current_filename = spreadsheet_widget.current_filename(); String name = "workbook"; Optional<String> save_path = GUI::FilePicker::get_save_filepath(window, name, "sheets"); @@ -129,9 +129,9 @@ int main(int argc, char* argv[]) if (!current_filename.is_empty()) spreadsheet_widget.set_filename(current_filename); })); - app_menu.add_separator(); + file_menu.add_separator(); - app_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) { + file_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) { if (!spreadsheet_widget.request_close()) return; app->quit(0); diff --git a/Userland/Applications/SystemMonitor/main.cpp b/Userland/Applications/SystemMonitor/main.cpp index bdc883634b..b66ea3a44e 100644 --- a/Userland/Applications/SystemMonitor/main.cpp +++ b/Userland/Applications/SystemMonitor/main.cpp @@ -321,8 +321,8 @@ int main(int argc, char** argv) &process_table_view); auto menubar = GUI::Menubar::construct(); - auto& app_menu = menubar->add_menu("&File"); - app_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) { + auto& file_menu = menubar->add_menu("&File"); + file_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) { GUI::Application::the()->quit(); })); diff --git a/Userland/Applications/Terminal/main.cpp b/Userland/Applications/Terminal/main.cpp index 90074061dc..0292207769 100644 --- a/Userland/Applications/Terminal/main.cpp +++ b/Userland/Applications/Terminal/main.cpp @@ -348,8 +348,8 @@ int main(int argc, char** argv) auto menubar = GUI::Menubar::construct(); - auto& app_menu = menubar->add_menu("&File"); - app_menu.add_action(GUI::Action::create("Open New &Terminal", { Mod_Ctrl | Mod_Shift, Key_N }, Gfx::Bitmap::load_from_file("/res/icons/16x16/app-terminal.png"), [&](auto&) { + auto& file_menu = menubar->add_menu("&File"); + file_menu.add_action(GUI::Action::create("Open New &Terminal", { Mod_Ctrl | Mod_Shift, Key_N }, Gfx::Bitmap::load_from_file("/res/icons/16x16/app-terminal.png"), [&](auto&) { pid_t child; const char* argv[] = { "Terminal", nullptr }; if ((errno = posix_spawn(&child, "/bin/Terminal", nullptr, nullptr, const_cast<char**>(argv), environ))) { @@ -360,9 +360,9 @@ int main(int argc, char** argv) } })); - app_menu.add_action(open_settings_action); - app_menu.add_separator(); - app_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) { + file_menu.add_action(open_settings_action); + file_menu.add_separator(); + file_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) { dbgln("Terminal: Quit menu activated!"); GUI::Application::the()->quit(); })); diff --git a/Userland/Applications/TextEditor/TextEditorWidget.cpp b/Userland/Applications/TextEditor/TextEditorWidget.cpp index e4c7dcb521..8724942e1a 100644 --- a/Userland/Applications/TextEditor/TextEditorWidget.cpp +++ b/Userland/Applications/TextEditor/TextEditorWidget.cpp @@ -353,13 +353,13 @@ TextEditorWidget::~TextEditorWidget() void TextEditorWidget::initialize_menubar(GUI::Menubar& menubar) { - 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); - app_menu.add_action(*m_save_as_action); - app_menu.add_separator(); - app_menu.add_action(GUI::CommonActions::make_quit_action([this](auto&) { + auto& file_menu = menubar.add_menu("&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); + file_menu.add_separator(); + file_menu.add_action(GUI::CommonActions::make_quit_action([this](auto&) { if (!request_close()) return; GUI::Application::the()->quit(); diff --git a/Userland/Demos/CatDog/main.cpp b/Userland/Demos/CatDog/main.cpp index 47b0f0482c..bcaef8ff39 100644 --- a/Userland/Demos/CatDog/main.cpp +++ b/Userland/Demos/CatDog/main.cpp @@ -213,8 +213,8 @@ int main(int argc, char** argv) root_widget.layout()->set_spacing(0); auto menubar = GUI::Menubar::construct(); - auto& app_menu = menubar->add_menu("File"); - app_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); })); + auto& file_menu = menubar->add_menu("File"); + file_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); })); auto& help_menu = menubar->add_menu("Help"); help_menu.add_action(GUI::CommonActions::make_about_action("CatDog Demo", app_icon, window)); window->set_menubar(move(menubar)); diff --git a/Userland/Demos/Cube/Cube.cpp b/Userland/Demos/Cube/Cube.cpp index a079035b60..55704d2d2f 100644 --- a/Userland/Demos/Cube/Cube.cpp +++ b/Userland/Demos/Cube/Cube.cpp @@ -244,22 +244,22 @@ int main(int argc, char** argv) window->set_icon(app_icon.bitmap_for_size(16)); auto menubar = GUI::Menubar::construct(); - auto& app_menu = menubar->add_menu("File"); + auto& file_menu = menubar->add_menu("&File"); auto show_window_frame_action = GUI::Action::create_checkable("Show window frame", [&](auto& action) { cube.set_show_window_frame(action.is_checked()); }); cube.set_show_window_frame(!flag_hide_window_frame); show_window_frame_action->set_checked(cube.show_window_frame()); - app_menu.add_action(move(show_window_frame_action)); - app_menu.add_separator(); - app_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); })); + file_menu.add_action(move(show_window_frame_action)); + file_menu.add_separator(); + file_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); })); auto& help_menu = menubar->add_menu("Help"); help_menu.add_action(GUI::CommonActions::make_about_action("Cube Demo", app_icon, window)); window->set_menubar(move(menubar)); cube.on_context_menu_request = [&](auto& event) { - app_menu.popup(event.screen_position()); + file_menu.popup(event.screen_position()); }; window->show(); diff --git a/Userland/Demos/Eyes/main.cpp b/Userland/Demos/Eyes/main.cpp index 5cc4dbd084..5932731be6 100644 --- a/Userland/Demos/Eyes/main.cpp +++ b/Userland/Demos/Eyes/main.cpp @@ -80,8 +80,8 @@ int main(int argc, char* argv[]) auto& eyes = window->set_main_widget<EyesWidget>(num_eyes, full_rows, extra_columns); auto menubar = GUI::Menubar::construct(); - auto& app_menu = menubar->add_menu("File"); - app_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); })); + auto& file_menu = menubar->add_menu("&File"); + file_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); })); auto& help_menu = menubar->add_menu("Help"); help_menu.add_action(GUI::CommonActions::make_about_action("Eyes Demo", app_icon, window)); diff --git a/Userland/Demos/Mouse/main.cpp b/Userland/Demos/Mouse/main.cpp index 1881742076..d4e682ee8e 100644 --- a/Userland/Demos/Mouse/main.cpp +++ b/Userland/Demos/Mouse/main.cpp @@ -179,8 +179,8 @@ int main(int argc, char** argv) main_widget.set_fill_with_background_color(true); auto menubar = GUI::Menubar::construct(); - auto& app_menu = menubar->add_menu("File"); - app_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); })); + auto& file_menu = menubar->add_menu("&File"); + file_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); })); auto& help_menu = menubar->add_menu("Help"); help_menu.add_action(GUI::CommonActions::make_about_action("Mouse Demo", app_icon, window)); diff --git a/Userland/Demos/WidgetGallery/main.cpp b/Userland/Demos/WidgetGallery/main.cpp index ba1326df86..eb0acb76d8 100644 --- a/Userland/Demos/WidgetGallery/main.cpp +++ b/Userland/Demos/WidgetGallery/main.cpp @@ -57,10 +57,10 @@ int main(int argc, char** argv) auto menubar = GUI::Menubar::construct(); - auto& app_menu = menubar->add_menu("File"); - app_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); })); + auto& file_menu = menubar->add_menu("&File"); + file_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); })); - auto& help_menu = menubar->add_menu("Help"); + auto& help_menu = menubar->add_menu("&Help"); help_menu.add_action(GUI::CommonActions::make_about_action("Widget Gallery", app_icon, window)); window->set_menubar(move(menubar)); diff --git a/Userland/DevTools/Inspector/main.cpp b/Userland/DevTools/Inspector/main.cpp index 8cdf9ed310..2b25fabbf9 100644 --- a/Userland/DevTools/Inspector/main.cpp +++ b/Userland/DevTools/Inspector/main.cpp @@ -115,8 +115,8 @@ int main(int argc, char** argv) window->set_icon(app_icon.bitmap_for_size(16)); auto menubar = GUI::Menubar::construct(); - auto& app_menu = menubar->add_menu("File"); - app_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); })); + auto& file_menu = menubar->add_menu("&File"); + file_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); })); auto& help_menu = menubar->add_menu("Help"); help_menu.add_action(GUI::CommonActions::make_help_action([](auto&) { diff --git a/Userland/DevTools/Playground/main.cpp b/Userland/DevTools/Playground/main.cpp index 7bb23db6ba..fcd2f15d2c 100644 --- a/Userland/DevTools/Playground/main.cpp +++ b/Userland/DevTools/Playground/main.cpp @@ -134,9 +134,9 @@ int main(int argc, char** argv) }; auto menubar = GUI::Menubar::construct(); - auto& app_menu = menubar->add_menu("&File"); + auto& file_menu = menubar->add_menu("&File"); - app_menu.add_action(GUI::CommonActions::make_open_action([&](auto&) { + file_menu.add_action(GUI::CommonActions::make_open_action([&](auto&) { Optional<String> open_path = GUI::FilePicker::get_open_filepath(window); if (!open_path.has_value()) @@ -157,7 +157,7 @@ int main(int argc, char** argv) editor.set_focus(true); })); - app_menu.add_action(GUI::CommonActions::make_save_as_action([&](auto&) { + file_menu.add_action(GUI::CommonActions::make_save_as_action([&](auto&) { Optional<String> save_path = GUI::FilePicker::get_save_filepath(window, "Untitled", "gml"); if (!save_path.has_value()) return; @@ -168,9 +168,9 @@ int main(int argc, char** argv) } })); - app_menu.add_separator(); + file_menu.add_separator(); - app_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) { + file_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); })); diff --git a/Userland/DevTools/Profiler/main.cpp b/Userland/DevTools/Profiler/main.cpp index 814c3e9489..219e929361 100644 --- a/Userland/DevTools/Profiler/main.cpp +++ b/Userland/DevTools/Profiler/main.cpp @@ -123,8 +123,8 @@ int main(int argc, char** argv) }; auto menubar = GUI::Menubar::construct(); - auto& app_menu = menubar->add_menu("&File"); - app_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); })); + auto& file_menu = menubar->add_menu("&File"); + file_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); })); auto& view_menu = menubar->add_menu("&View"); diff --git a/Userland/Games/Breakout/main.cpp b/Userland/Games/Breakout/main.cpp index 7cd51dbd80..8ccd78cecb 100644 --- a/Userland/Games/Breakout/main.cpp +++ b/Userland/Games/Breakout/main.cpp @@ -49,14 +49,14 @@ int main(int argc, char** argv) auto menubar = GUI::Menubar::construct(); - auto& app_menu = menubar->add_menu("Game"); - app_menu.add_action(GUI::Action::create_checkable("Pause", { {}, Key_P }, [&](auto& action) { + auto& game_menu = menubar->add_menu("&Game"); + game_menu.add_action(GUI::Action::create_checkable("&Pause", { {}, Key_P }, [&](auto& action) { game.set_paused(action.is_checked()); })); - app_menu.add_separator(); + game_menu.add_separator(); - app_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) { + game_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) { GUI::Application::the()->quit(); })); diff --git a/Userland/Games/Conway/main.cpp b/Userland/Games/Conway/main.cpp index 0eeaad71ce..2930def217 100644 --- a/Userland/Games/Conway/main.cpp +++ b/Userland/Games/Conway/main.cpp @@ -51,13 +51,13 @@ int main(int argc, char** argv) auto menubar = GUI::Menubar::construct(); - auto& app_menu = menubar->add_menu("Game"); + auto& game_menu = menubar->add_menu("Game"); - app_menu.add_action(GUI::Action::create("Reset", { Mod_None, Key_F2 }, [&](auto&) { + game_menu.add_action(GUI::Action::create("Reset", { Mod_None, Key_F2 }, [&](auto&) { game.reset(); })); - app_menu.add_separator(); - app_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) { + game_menu.add_separator(); + game_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) { GUI::Application::the()->quit(); })); diff --git a/Userland/Games/Minesweeper/main.cpp b/Userland/Games/Minesweeper/main.cpp index c6a1d1994a..00513087e2 100644 --- a/Userland/Games/Minesweeper/main.cpp +++ b/Userland/Games/Minesweeper/main.cpp @@ -86,25 +86,24 @@ int main(int argc, char** argv) auto menubar = GUI::Menubar::construct(); - auto& app_menu = menubar->add_menu("Game"); + auto& game_menu = menubar->add_menu("&Game"); - app_menu.add_action(GUI::Action::create("New game", { Mod_None, Key_F2 }, [&](auto&) { + game_menu.add_action(GUI::Action::create("&New Game", { Mod_None, Key_F2 }, [&](auto&) { field.reset(); })); - app_menu.add_separator(); + game_menu.add_separator(); auto chord_toggler_action = GUI::Action::create_checkable("Single-click chording", [&](auto& action) { field.set_single_chording(action.is_checked()); }); chord_toggler_action->set_checked(field.is_single_chording()); - app_menu.add_action(*chord_toggler_action); - app_menu.add_separator(); + game_menu.add_action(*chord_toggler_action); + game_menu.add_separator(); - app_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) { + game_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) { GUI::Application::the()->quit(); - return; })); auto& difficulty_menu = menubar->add_menu("Difficulty"); diff --git a/Userland/Games/Pong/main.cpp b/Userland/Games/Pong/main.cpp index 6451b5d3ec..a2f8b4a24c 100644 --- a/Userland/Games/Pong/main.cpp +++ b/Userland/Games/Pong/main.cpp @@ -56,8 +56,8 @@ int main(int argc, char** argv) auto menubar = GUI::Menubar::construct(); - auto& app_menu = menubar->add_menu("&Game"); - app_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) { + auto& game_menu = menubar->add_menu("&Game"); + game_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) { GUI::Application::the()->quit(); })); diff --git a/Userland/Games/Snake/main.cpp b/Userland/Games/Snake/main.cpp index ae10a8b7a1..a4d7d954cb 100644 --- a/Userland/Games/Snake/main.cpp +++ b/Userland/Games/Snake/main.cpp @@ -60,13 +60,13 @@ int main(int argc, char** argv) auto menubar = GUI::Menubar::construct(); - auto& app_menu = menubar->add_menu("Game"); + auto& game_menu = menubar->add_menu("&Game"); - app_menu.add_action(GUI::Action::create("New game", { Mod_None, Key_F2 }, [&](auto&) { + game_menu.add_action(GUI::Action::create("&New Game", { Mod_None, Key_F2 }, [&](auto&) { game.reset(); })); - app_menu.add_separator(); - app_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) { + game_menu.add_separator(); + game_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) { GUI::Application::the()->quit(); })); diff --git a/Userland/Games/Solitaire/main.cpp b/Userland/Games/Solitaire/main.cpp index fb7b3fc5b8..d345a64e18 100644 --- a/Userland/Games/Solitaire/main.cpp +++ b/Userland/Games/Solitaire/main.cpp @@ -44,13 +44,13 @@ int main(int argc, char** argv) }); auto menubar = GUI::Menubar::construct(); - auto& app_menu = menubar->add_menu("Game"); + auto& game_menu = menubar->add_menu("&Game"); - app_menu.add_action(GUI::Action::create("New game", { Mod_None, Key_F2 }, [&](auto&) { + game_menu.add_action(GUI::Action::create("&New Game", { Mod_None, Key_F2 }, [&](auto&) { widget->setup(); })); - app_menu.add_separator(); - app_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); })); + game_menu.add_separator(); + game_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); })); auto& help_menu = menubar->add_menu("Help"); help_menu.add_action(GUI::CommonActions::make_about_action("Solitaire", app_icon, window)); |