mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
FileManager: Added menu to show dotfiles in directory context menu
This commit is contained in:
parent
455ce0b9c3
commit
31791945ab
Notes:
sideshowbarker
2024-07-19 01:56:16 +09:00
Author: https://github.com/kessejones Commit: https://github.com/SerenityOS/serenity/commit/31791945abc Pull-request: https://github.com/SerenityOS/serenity/pull/3729
1 changed files with 7 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue