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.
This commit is contained in:
Andreas Kling 2021-05-12 21:32:54 +02:00
parent bc0146932e
commit bed2356b11
Notes: sideshowbarker 2024-07-18 18:17:23 +09:00

View File

@ -805,11 +805,7 @@ int run_in_windowed_mode(RefPtr<Core::ConfigFile> 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<Core::ConfigFile> 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<Core::ConfigFile> 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));