mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:17:34 +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_separator();
|
||||||
view_menu.add_action(action_show_dotfiles);
|
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");
|
auto& go_menu = menubar->add_menu("Go");
|
||||||
go_menu.add_action(go_back_action);
|
go_menu.add_action(go_back_action);
|
||||||
go_menu.add_action(go_forward_action);
|
go_menu.add_action(go_forward_action);
|
||||||
go_menu.add_action(open_parent_directory_action);
|
go_menu.add_action(open_parent_directory_action);
|
||||||
go_menu.add_action(go_home_action);
|
go_menu.add_action(go_home_action);
|
||||||
go_menu.add_action(GUI::Action::create(
|
go_menu.add_action(go_to_location_action);
|
||||||
"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& help_menu = menubar->add_menu("Help");
|
auto& help_menu = menubar->add_menu("Help");
|
||||||
help_menu.add_action(GUI::CommonActions::make_about_action("File Manager", GUI::Icon::default_icon("filetype-folder")));
|
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();
|
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) {
|
tree_view.on_drop = [&](const GUI::ModelIndex& index, const GUI::DropEvent& event) {
|
||||||
if (!event.mime_data().has_urls())
|
if (!event.mime_data().has_urls())
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue