From bed2356b116fb368250dce988738afa464fab6ed Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 12 May 2021 21:32:54 +0200 Subject: [PATCH] FileManager: Reorganize menus a little bit Move the common editing actions (cut/copy/paste/select-all) into a new "Edit" menu. And move the "Open Terminal Here" action to the "Go" menu. --- Userland/Applications/FileManager/main.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Userland/Applications/FileManager/main.cpp b/Userland/Applications/FileManager/main.cpp index 75524f3b5bd..2cfcc1aa470 100644 --- a/Userland/Applications/FileManager/main.cpp +++ b/Userland/Applications/FileManager/main.cpp @@ -805,11 +805,7 @@ int run_in_windowed_mode(RefPtr config, String initial_locatio 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(); @@ -817,6 +813,13 @@ int run_in_windowed_mode(RefPtr config, String initial_locatio GUI::Application::the()->quit(); })); + auto& edit_menu = menubar->add_menu("&Edit"); + edit_menu.add_action(copy_action); + edit_menu.add_action(cut_action); + edit_menu.add_action(paste_action); + edit_menu.add_separator(); + edit_menu.add_action(select_all_action); + auto action_show_dotfiles = GUI::Action::create_checkable("Show &Dotfiles", { Mod_Ctrl, Key_H }, [&](auto& action) { directory_view.set_should_show_dotfiles(action.is_checked()); refresh_tree_view(); @@ -857,6 +860,8 @@ int run_in_windowed_mode(RefPtr config, String initial_locatio go_menu.add_action(open_parent_directory_action); go_menu.add_action(go_home_action); go_menu.add_action(go_to_location_action); + go_menu.add_separator(); + go_menu.add_action(directory_view.open_terminal_action()); auto& help_menu = menubar->add_menu("&Help"); help_menu.add_action(GUI::CommonActions::make_about_action("File Manager", GUI::Icon::default_icon("app-file-manager"), window));