summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-04-09 15:55:28 +0200
committerAndreas Kling <kling@serenityos.org>2021-04-09 17:08:49 +0200
commitc2b760e335175b0597a95f8d059520224ae56722 (patch)
treec18ef0d79f3af411293ff7251ffd9b4677192880 /Userland
parentafb6e3a79d847f94eeed229c84e41e3406ab2f88 (diff)
downloadserenity-c2b760e335175b0597a95f8d059520224ae56722.zip
Terminal+LibVT: Add Alt shortcuts to menu actions
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Applications/Terminal/main.cpp8
-rw-r--r--Userland/Libraries/LibVT/TerminalWidget.cpp12
2 files changed, 10 insertions, 10 deletions
diff --git a/Userland/Applications/Terminal/main.cpp b/Userland/Applications/Terminal/main.cpp
index 73fd4b5788..ae1a2f78ea 100644
--- a/Userland/Applications/Terminal/main.cpp
+++ b/Userland/Applications/Terminal/main.cpp
@@ -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);
diff --git a/Userland/Libraries/LibVT/TerminalWidget.cpp b/Userland/Libraries/LibVT/TerminalWidget.cpp
index 9ee1e1ee90..f777c2cbde 100644
--- a/Userland/Libraries/LibVT/TerminalWidget.cpp
+++ b/Userland/Libraries/LibVT/TerminalWidget.cpp
@@ -141,17 +141,17 @@ TerminalWidget::TerminalWidget(int ptm_fd, bool automatic_size_policy, RefPtr<Co
m_terminal.set_size(m_config->read_num_entry("Window", "Width", 80), m_config->read_num_entry("Window", "Height", 25));
- m_copy_action = GUI::Action::create("Copy", { Mod_Ctrl | Mod_Shift, Key_C }, Gfx::Bitmap::load_from_file("/res/icons/16x16/edit-copy.png"), [this](auto&) {
+ m_copy_action = GUI::Action::create("&Copy", { Mod_Ctrl | Mod_Shift, Key_C }, Gfx::Bitmap::load_from_file("/res/icons/16x16/edit-copy.png"), [this](auto&) {
copy();
});
m_copy_action->set_swallow_key_event_when_disabled(true);
- m_paste_action = GUI::Action::create("Paste", { Mod_Ctrl | Mod_Shift, Key_V }, Gfx::Bitmap::load_from_file("/res/icons/16x16/paste.png"), [this](auto&) {
+ m_paste_action = GUI::Action::create("&Paste", { Mod_Ctrl | Mod_Shift, Key_V }, Gfx::Bitmap::load_from_file("/res/icons/16x16/paste.png"), [this](auto&) {
paste();
});
m_paste_action->set_swallow_key_event_when_disabled(true);
- m_clear_including_history_action = GUI::Action::create("Clear including history", { Mod_Ctrl | Mod_Shift, Key_K }, [this](auto&) {
+ m_clear_including_history_action = GUI::Action::create("&Clear Including History", { Mod_Ctrl | Mod_Shift, Key_K }, [this](auto&) {
clear_including_history();
});
@@ -1026,7 +1026,7 @@ void TerminalWidget::context_menu_event(GUI::ContextMenuEvent& event)
auto af = Desktop::AppFile::get_for_app(LexicalPath(handler).basename());
if (!af->is_valid())
continue;
- auto action = GUI::Action::create(String::formatted("Open in {}", af->name()), af->icon().bitmap_for_size(16), [this, handler](auto&) {
+ auto action = GUI::Action::create(String::formatted("&Open in {}", af->name()), af->icon().bitmap_for_size(16), [this, handler](auto&) {
Desktop::Launcher::open(m_context_menu_href, handler);
});
@@ -1036,10 +1036,10 @@ void TerminalWidget::context_menu_event(GUI::ContextMenuEvent& event)
m_context_menu_for_hyperlink->add_action(action);
}
- m_context_menu_for_hyperlink->add_action(GUI::Action::create("Copy URL", [this](auto&) {
+ m_context_menu_for_hyperlink->add_action(GUI::Action::create("Copy &URL", [this](auto&) {
GUI::Clipboard::the().set_plain_text(m_context_menu_href);
}));
- m_context_menu_for_hyperlink->add_action(GUI::Action::create("Copy name", [&](auto&) {
+ m_context_menu_for_hyperlink->add_action(GUI::Action::create("Copy &Name", [&](auto&) {
// file://courage/home/anon/something -> /home/anon/something
auto path = URL(m_context_menu_href).path();
// /home/anon/something -> something