mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 12:37:44 +00:00
FileManager: Show location bar on breadcrumb bar double-click.
This commit is contained in:
parent
4b3c61fad8
commit
eeffdb9725
1 changed files with 12 additions and 7 deletions
|
@ -634,18 +634,19 @@ int run_in_windowed_mode(RefPtr<Core::ConfigFile> config, String initial_locatio
|
|||
view_menu.add_separator();
|
||||
view_menu.add_action(action_show_dotfiles);
|
||||
|
||||
auto go_to_location_action = GUI::Action::create("Go to location...", { Mod_Ctrl, Key_L }, [&](auto&) {
|
||||
location_toolbar.set_visible(true);
|
||||
breadcrumb_toolbar.set_visible(false);
|
||||
location_textbox.select_all();
|
||||
location_textbox.set_focus(true);
|
||||
});
|
||||
|
||||
auto& go_menu = menubar->add_menu("Go");
|
||||
go_menu.add_action(go_back_action);
|
||||
go_menu.add_action(go_forward_action);
|
||||
go_menu.add_action(open_parent_directory_action);
|
||||
go_menu.add_action(go_home_action);
|
||||
go_menu.add_action(GUI::Action::create(
|
||||
"Go to location...", { Mod_Ctrl, Key_L }, [&](auto&) {
|
||||
location_toolbar.set_visible(true);
|
||||
breadcrumb_toolbar.set_visible(false);
|
||||
location_textbox.select_all();
|
||||
location_textbox.set_focus(true);
|
||||
}));
|
||||
go_menu.add_action(go_to_location_action);
|
||||
|
||||
auto& help_menu = menubar->add_menu("Help");
|
||||
help_menu.add_action(GUI::CommonActions::make_about_action("File Manager", GUI::Icon::default_icon("filetype-folder")));
|
||||
|
@ -924,6 +925,10 @@ int run_in_windowed_mode(RefPtr<Core::ConfigFile> config, String initial_locatio
|
|||
event.accept();
|
||||
};
|
||||
|
||||
breadcrumb_bar.on_doubleclick = [&](const GUI::MouseEvent&) {
|
||||
go_to_location_action->activate();
|
||||
};
|
||||
|
||||
tree_view.on_drop = [&](const GUI::ModelIndex& index, const GUI::DropEvent& event) {
|
||||
if (!event.mime_data().has_urls())
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue