mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-11 01:06:01 +03:00
FileManager: Save 'Show dotfiles' setting in FileManager.ini
This commit is contained in:
parent
f9c1918484
commit
cb42ba0ab1
Notes:
sideshowbarker
2024-07-19 17:29:39 +09:00
Author: https://github.com/thankyouverycool Commit: https://github.com/SerenityOS/serenity/commit/cb42ba0ab1f Pull-request: https://github.com/SerenityOS/serenity/pull/5313
@ -1,5 +1,6 @@
|
||||
[DirectoryView]
|
||||
ViewMode=Icon
|
||||
ShowDotFiles=0
|
||||
|
||||
[Window]
|
||||
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) {
|
||||
directory_view.set_should_show_dotfiles(action.is_checked());
|
||||
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");
|
||||
view_menu.add_action(*view_as_icons_action);
|
||||
view_menu.add_action(*view_as_table_action);
|
||||
|
Loading…
Reference in New Issue
Block a user