summaryrefslogtreecommitdiff
path: root/Applications/FileManager
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-07-18 18:46:37 +0200
committerAndreas Kling <kling@serenityos.org>2020-07-19 21:15:00 +0200
commit9710c9742ca55986abc4cb7e9f21c95bc3ad4db0 (patch)
tree5fad2b15e398f9d52aede401e47f79b9dbe0cf5c /Applications/FileManager
parentad57a2f18b4915ba57b9c9e1e9c0ddd6ff4cfe2a (diff)
downloadserenity-9710c9742ca55986abc4cb7e9f21c95bc3ad4db0.zip
LibGUI+FileManager: Add setting for showing/hiding dotfiles
GUI::FileSystemModel can now be told to display (or not display) files whose name start with a dot (other than . and ..)
Diffstat (limited to 'Applications/FileManager')
-rw-r--r--Applications/FileManager/main.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Applications/FileManager/main.cpp b/Applications/FileManager/main.cpp
index 4f3a7e3088..474d7bf9db 100644
--- a/Applications/FileManager/main.cpp
+++ b/Applications/FileManager/main.cpp
@@ -655,6 +655,10 @@ int run_in_windowed_mode(RefPtr<Core::ConfigFile> config, String initial_locatio
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.model().set_should_show_dotfiles(action.is_checked());
+ }));
auto& go_menu = menubar->add_menu("Go");
go_menu.add_action(go_back_action);