mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 09:17:35 +00:00
FileManager: Save 'Show dotfiles' setting in FileManager.ini
This commit is contained in:
parent
f9c1918484
commit
cb42ba0ab1
2 changed files with 7 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
||||||
[DirectoryView]
|
[DirectoryView]
|
||||||
ViewMode=Icon
|
ViewMode=Icon
|
||||||
|
ShowDotFiles=0
|
||||||
|
|
||||||
[Window]
|
[Window]
|
||||||
Left=150
|
Left=150
|
||||||
|
|
|
@ -623,8 +623,14 @@ int run_in_windowed_mode(RefPtr<Core::ConfigFile> config, String initial_locatio
|
||||||
auto action_show_dotfiles = GUI::Action::create_checkable("Show dotfiles", { Mod_Ctrl, Key_H }, [&](auto& 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());
|
directory_view.set_should_show_dotfiles(action.is_checked());
|
||||||
refresh_tree_view();
|
refresh_tree_view();
|
||||||
|
config->write_bool_entry("DirectoryView", "ShowDotFiles", action.is_checked());
|
||||||
|
config->sync();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
auto show_dotfiles = config->read_bool_entry("DirectoryView", "ShowDotFiles", false);
|
||||||
|
directory_view.set_should_show_dotfiles(show_dotfiles);
|
||||||
|
action_show_dotfiles->set_checked(show_dotfiles);
|
||||||
|
|
||||||
auto& view_menu = menubar->add_menu("View");
|
auto& view_menu = menubar->add_menu("View");
|
||||||
view_menu.add_action(*view_as_icons_action);
|
view_menu.add_action(*view_as_icons_action);
|
||||||
view_menu.add_action(*view_as_table_action);
|
view_menu.add_action(*view_as_table_action);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue