mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:47:44 +00:00
FileManager: Add Alt shortcuts to menu actions
This commit is contained in:
parent
f718f04b14
commit
c6c0ec9403
2 changed files with 21 additions and 21 deletions
|
@ -495,7 +495,7 @@ void DirectoryView::handle_selection_change()
|
|||
|
||||
void DirectoryView::setup_actions()
|
||||
{
|
||||
m_mkdir_action = GUI::Action::create("New directory...", { Mod_Ctrl | Mod_Shift, Key_N }, Gfx::Bitmap::load_from_file("/res/icons/16x16/mkdir.png"), [&](const GUI::Action&) {
|
||||
m_mkdir_action = GUI::Action::create("New &Directory...", { Mod_Ctrl | Mod_Shift, Key_N }, Gfx::Bitmap::load_from_file("/res/icons/16x16/mkdir.png"), [&](const GUI::Action&) {
|
||||
String value;
|
||||
if (GUI::InputBox::show(window(), value, "Enter name:", "New directory") == GUI::InputBox::ExecOK && !value.is_empty()) {
|
||||
auto new_dir_path = LexicalPath::canonicalized_path(String::formatted("{}/{}", path(), value));
|
||||
|
@ -507,7 +507,7 @@ void DirectoryView::setup_actions()
|
|||
}
|
||||
});
|
||||
|
||||
m_touch_action = GUI::Action::create("New file...", { Mod_Ctrl | Mod_Shift, Key_F }, Gfx::Bitmap::load_from_file("/res/icons/16x16/new.png"), [&](const GUI::Action&) {
|
||||
m_touch_action = GUI::Action::create("New &File...", { Mod_Ctrl | Mod_Shift, Key_F }, Gfx::Bitmap::load_from_file("/res/icons/16x16/new.png"), [&](const GUI::Action&) {
|
||||
String value;
|
||||
if (GUI::InputBox::show(window(), value, "Enter name:", "New file") == GUI::InputBox::ExecOK && !value.is_empty()) {
|
||||
auto new_file_path = LexicalPath::canonicalized_path(String::formatted("{}/{}", path(), value));
|
||||
|
@ -533,7 +533,7 @@ void DirectoryView::setup_actions()
|
|||
}
|
||||
});
|
||||
|
||||
m_open_terminal_action = GUI::Action::create("Open Terminal here", Gfx::Bitmap::load_from_file("/res/icons/16x16/app-terminal.png"), [&](auto&) {
|
||||
m_open_terminal_action = GUI::Action::create("Open &Terminal Here", Gfx::Bitmap::load_from_file("/res/icons/16x16/app-terminal.png"), [&](auto&) {
|
||||
posix_spawn_file_actions_t spawn_actions;
|
||||
posix_spawn_file_actions_init(&spawn_actions);
|
||||
posix_spawn_file_actions_addchdir(&spawn_actions, path().characters());
|
||||
|
@ -551,7 +551,7 @@ void DirectoryView::setup_actions()
|
|||
m_delete_action = GUI::CommonActions::make_delete_action([this](auto&) { do_delete(true); }, window());
|
||||
|
||||
m_force_delete_action = GUI::Action::create(
|
||||
"Delete without confirmation", { Mod_Shift, Key_Delete },
|
||||
"Delete Without Confirmation", { Mod_Shift, Key_Delete },
|
||||
[this](auto&) { do_delete(false); },
|
||||
window());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue