From 0ffd319bdaa8ba93b74701f4b9a44e8567d2aadc Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 17 Aug 2020 19:59:11 +0200 Subject: [PATCH] FileManager: Partially bring back the desktop context menu --- Applications/FileManager/main.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Applications/FileManager/main.cpp b/Applications/FileManager/main.cpp index e216a629ac..676c18d872 100644 --- a/Applications/FileManager/main.cpp +++ b/Applications/FileManager/main.cpp @@ -167,18 +167,20 @@ int run_in_desktop_mode(RefPtr config) auto desktop_view_context_menu = GUI::Menu::construct("Directory View"); -#if 0 auto file_manager_action = GUI::Action::create("Show in FileManager...", {}, Gfx::Bitmap::load_from_file("/res/icons/16x16/filetype-folder.png"), [&](const GUI::Action&) { - Desktop::Launcher::open(URL::create_with_file_protocol(model->root_path())); + Desktop::Launcher::open(URL::create_with_file_protocol(directory_view.path())); }); auto display_properties_action = GUI::Action::create("Display settings...", {}, Gfx::Bitmap::load_from_file("/res/icons/16x16/app-display-settings.png"), [&](const GUI::Action&) { Desktop::Launcher::open(URL::create_with_file_protocol("/bin/DisplaySettings")); }); +#if 0 desktop_view_context_menu->add_action(mkdir_action); desktop_view_context_menu->add_action(touch_action); desktop_view_context_menu->add_separator(); +#endif + desktop_view_context_menu->add_action(file_manager_action); desktop_view_context_menu->add_separator(); desktop_view_context_menu->add_action(display_properties_action); @@ -187,7 +189,6 @@ int run_in_desktop_mode(RefPtr config) if (!index.is_valid()) desktop_view_context_menu->popup(event.screen_position()); }; -#endif auto wm_config = Core::ConfigFile::get_for_app("WindowManager"); auto selected_wallpaper = wm_config->read_entry("Background", "Wallpaper", "");