From 786f6841b3371dfd06c85bfb856c583ddf2d9cd5 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 22 May 2021 23:28:03 +0200 Subject: [PATCH] SystemMonitor: Remove "Inspect Process" action from context menu Since everyone opts out of being inspectable by default now, let's not offer inspection from the menu since it will fail in a default setup. --- Userland/Applications/SystemMonitor/main.cpp | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/Userland/Applications/SystemMonitor/main.cpp b/Userland/Applications/SystemMonitor/main.cpp index 4e101f8f2c..f51451a18d 100644 --- a/Userland/Applications/SystemMonitor/main.cpp +++ b/Userland/Applications/SystemMonitor/main.cpp @@ -284,24 +284,6 @@ int main(int argc, char** argv) }, &process_table_view); - auto inspect_action = GUI::Action::create( - "&Inspect Process", { Mod_Ctrl, Key_I }, - Gfx::Bitmap::load_from_file("/res/icons/16x16/app-inspector.png"), [&](auto&) { - pid_t pid = selected_id(ProcessModel::Column::PID); - if (pid != -1) { - auto pid_string = String::number(pid); - pid_t child; - const char* argv[] = { "/bin/Inspector", pid_string.characters(), nullptr }; - if ((errno = posix_spawn(&child, "/bin/Inspector", nullptr, nullptr, const_cast(argv), environ))) { - perror("posix_spawn"); - } else { - if (disown(child) < 0) - perror("disown"); - } - } - }, - &process_table_view); - HashMap> process_windows; auto process_properties_action = GUI::CommonActions::make_properties_action( @@ -339,7 +321,6 @@ int main(int argc, char** argv) process_context_menu->add_action(continue_action); process_context_menu->add_separator(); process_context_menu->add_action(profile_action); - process_context_menu->add_action(inspect_action); process_context_menu->add_separator(); process_context_menu->add_action(process_properties_action); process_table_view.on_context_menu_request = [&]([[maybe_unused]] const GUI::ModelIndex& index, const GUI::ContextMenuEvent& event) {