1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:07:45 +00:00

Terminal+LibVT: Add Alt shortcuts to menu actions

This commit is contained in:
Andreas Kling 2021-04-09 15:55:28 +02:00
parent afb6e3a79d
commit c2b760e335
2 changed files with 10 additions and 10 deletions

View file

@ -401,7 +401,7 @@ int main(int argc, char** argv)
auto new_scrollback_size = config->read_num_entry("Terminal", "MaxHistorySize", terminal.max_history_size());
terminal.set_max_history_size(new_scrollback_size);
auto open_settings_action = GUI::Action::create("Settings", Gfx::Bitmap::load_from_file("/res/icons/16x16/gear.png"),
auto open_settings_action = GUI::Action::create("&Settings", Gfx::Bitmap::load_from_file("/res/icons/16x16/gear.png"),
[&](const GUI::Action&) {
if (!settings_window)
settings_window = create_settings_window(terminal);
@ -410,7 +410,7 @@ int main(int argc, char** argv)
});
terminal.context_menu().add_separator();
auto pick_font_action = GUI::Action::create("Terminal font...", Gfx::Bitmap::load_from_file("/res/icons/16x16/app-font-editor.png"),
auto pick_font_action = GUI::Action::create("Terminal &Font...", Gfx::Bitmap::load_from_file("/res/icons/16x16/app-font-editor.png"),
[&](auto&) {
auto picker = GUI::FontPicker::construct(window, &terminal.font(), true);
if (picker->exec() == GUI::Dialog::ExecOK) {
@ -429,7 +429,7 @@ int main(int argc, char** argv)
auto menubar = GUI::MenuBar::construct();
auto& app_menu = menubar->add_menu("&File");
app_menu.add_action(GUI::Action::create("Open new Terminal", { Mod_Ctrl | Mod_Shift, Key_N }, Gfx::Bitmap::load_from_file("/res/icons/16x16/app-terminal.png"), [&](auto&) {
app_menu.add_action(GUI::Action::create("Open New &Terminal", { Mod_Ctrl | Mod_Shift, Key_N }, Gfx::Bitmap::load_from_file("/res/icons/16x16/app-terminal.png"), [&](auto&) {
pid_t child;
const char* argv[] = { "Terminal", nullptr };
if ((errno = posix_spawn(&child, "/bin/Terminal", nullptr, nullptr, const_cast<char**>(argv), environ))) {
@ -451,7 +451,7 @@ int main(int argc, char** argv)
edit_menu.add_action(terminal.copy_action());
edit_menu.add_action(terminal.paste_action());
edit_menu.add_separator();
edit_menu.add_action(GUI::Action::create("Find...", { Mod_Ctrl | Mod_Shift, Key_F }, Gfx::Bitmap::load_from_file("/res/icons/16x16/find.png"),
edit_menu.add_action(GUI::Action::create("&Find...", { Mod_Ctrl | Mod_Shift, Key_F }, Gfx::Bitmap::load_from_file("/res/icons/16x16/find.png"),
[&](auto&) {
if (!find_window)
find_window = create_find_window(terminal);