summaryrefslogtreecommitdiff
path: root/Userland/Services/Taskbar
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-03-26 13:31:10 +0100
committerAndreas Kling <kling@serenityos.org>2021-03-26 13:31:10 +0100
commitb8a9f433f93c18669c016dd6f4aa0e3e069160a1 (patch)
tree7e4cd93db85044eac913d2521b454c588b8b1367 /Userland/Services/Taskbar
parentb220c89c5c68f0714f1d84a0a4dbc82bff7424c2 (diff)
downloadserenity-b8a9f433f93c18669c016dd6f4aa0e3e069160a1.zip
Taskbar: Move "About SerenityOS" to the top of the start menu
Diffstat (limited to 'Userland/Services/Taskbar')
-rw-r--r--Userland/Services/Taskbar/main.cpp23
1 files changed, 13 insertions, 10 deletions
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<GUI::Menu> build_system_menu()
const Vector<String> 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<char**>(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<String, NonnullRefPtr<GUI::Menu>> app_category_menus;
auto category_icons = Core::ConfigFile::open("/res/icons/SystemMenu.ini");
@@ -205,16 +218,6 @@ NonnullRefPtr<GUI::Menu> 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<char**>(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();