From b8a9f433f93c18669c016dd6f4aa0e3e069160a1 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 26 Mar 2021 13:31:10 +0100 Subject: Taskbar: Move "About SerenityOS" to the top of the start menu --- Userland/Services/Taskbar/main.cpp | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'Userland/Services/Taskbar') diff --git a/Userland/Services/Taskbar/main.cpp b/Userland/Services/Taskbar/main.cpp index 04e743dadc..49ff63f53b 100644 --- a/Userland/Services/Taskbar/main.cpp +++ b/Userland/Services/Taskbar/main.cpp @@ -116,6 +116,19 @@ NonnullRefPtr build_system_menu() const Vector sorted_app_categories = discover_apps_and_categories(); auto system_menu = GUI::Menu::construct("\xE2\x9A\xA1"); // HIGH VOLTAGE SIGN + system_menu->add_action(GUI::Action::create("About SerenityOS", Gfx::Bitmap::load_from_file("/res/icons/16x16/ladybug.png"), [](auto&) { + pid_t child_pid; + const char* argv[] = { "/bin/About", nullptr }; + if ((errno = posix_spawn(&child_pid, "/bin/About", nullptr, nullptr, const_cast(argv), environ))) { + perror("posix_spawn"); + } else { + if (disown(child_pid) < 0) + perror("disown"); + } + })); + + system_menu->add_separator(); + // First we construct all the necessary app category submenus. HashMap> app_category_menus; auto category_icons = Core::ConfigFile::open("/res/icons/SystemMenu.ini"); @@ -205,16 +218,6 @@ NonnullRefPtr build_system_menu() perror("disown"); } })); - system_menu->add_action(GUI::Action::create("About SerenityOS", Gfx::Bitmap::load_from_file("/res/icons/16x16/ladybug.png"), [](auto&) { - pid_t child_pid; - const char* argv[] = { "/bin/About", nullptr }; - if ((errno = posix_spawn(&child_pid, "/bin/About", nullptr, nullptr, const_cast(argv), environ))) { - perror("posix_spawn"); - } else { - if (disown(child_pid) < 0) - perror("disown"); - } - })); system_menu->add_separator(); system_menu->add_action(GUI::Action::create("Exit...", Gfx::Bitmap::load_from_file("/res/icons/16x16/power.png"), [](auto&) { auto command = ShutdownDialog::show(); -- cgit v1.2.3