summaryrefslogtreecommitdiff
path: root/Applications/FileManager
diff options
context:
space:
mode:
authorKesse Jones <kjonesfc@outlook.com>2020-10-08 17:34:48 -0300
committerAndreas Kling <kling@serenityos.org>2020-10-10 23:29:18 +0200
commit31791945abc170bbfbc17b6c39a5b9f125c89281 (patch)
treebafb4af1c5ce9e02a608e351ffb88a19bd436f71 /Applications/FileManager
parent455ce0b9c3b88d06758ee0c66d2e6039c0d9cec8 (diff)
downloadserenity-31791945abc170bbfbc17b6c39a5b9f125c89281.zip
FileManager: Added menu to show dotfiles in directory context menu
Diffstat (limited to 'Applications/FileManager')
-rw-r--r--Applications/FileManager/main.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/Applications/FileManager/main.cpp b/Applications/FileManager/main.cpp
index cb0d07c45c..33c770f76a 100644
--- a/Applications/FileManager/main.cpp
+++ b/Applications/FileManager/main.cpp
@@ -470,14 +470,16 @@ int run_in_windowed_mode(RefPtr<Core::ConfigFile> config, String initial_locatio
GUI::Application::the()->quit();
}));
+ 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());
+ });
+
auto& view_menu = menubar->add_menu("View");
view_menu.add_action(*view_as_icons_action);
view_menu.add_action(*view_as_table_action);
view_menu.add_action(*view_as_columns_action);
view_menu.add_separator();
- view_menu.add_action(GUI::Action::create_checkable("Show dotfiles", { Mod_Ctrl, Key_H }, [&](auto& action) {
- directory_view.set_should_show_dotfiles(action.is_checked());
- }));
+ view_menu.add_action(action_show_dotfiles);
auto& go_menu = menubar->add_menu("Go");
go_menu.add_action(go_back_action);
@@ -575,6 +577,8 @@ int run_in_windowed_mode(RefPtr<Core::ConfigFile> config, String initial_locatio
directory_view_context_menu->add_action(paste_action);
directory_view_context_menu->add_action(directory_view.open_terminal_action());
directory_view_context_menu->add_separator();
+ directory_view_context_menu->add_action(action_show_dotfiles);
+ directory_view_context_menu->add_separator();
directory_view_context_menu->add_action(properties_action);
tree_view_directory_context_menu->add_action(copy_action);