mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-08 12:19:37 +03:00
Browser: Add more Alt shortcuts to menu actions
This commit is contained in:
parent
3e43b1f173
commit
e34238945d
Notes:
sideshowbarker
2024-07-18 20:37:06 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/e34238945d1
@ -173,20 +173,20 @@ Tab::Tab(Type type)
|
||||
};
|
||||
|
||||
m_link_context_menu = GUI::Menu::construct();
|
||||
auto link_default_action = GUI::Action::create("Open", [this](auto&) {
|
||||
auto link_default_action = GUI::Action::create("&Open", [this](auto&) {
|
||||
hooks().on_link_click(m_link_context_menu_url, "", 0);
|
||||
});
|
||||
m_link_context_menu->add_action(link_default_action);
|
||||
m_link_context_menu_default_action = link_default_action;
|
||||
m_link_context_menu->add_action(GUI::Action::create("Open in new tab", [this](auto&) {
|
||||
m_link_context_menu->add_action(GUI::Action::create("Open in New &Tab", [this](auto&) {
|
||||
hooks().on_link_click(m_link_context_menu_url, "_blank", 0);
|
||||
}));
|
||||
m_link_context_menu->add_separator();
|
||||
m_link_context_menu->add_action(GUI::Action::create("Copy link", [this](auto&) {
|
||||
m_link_context_menu->add_action(GUI::Action::create("&Copy URL", [this](auto&) {
|
||||
GUI::Clipboard::the().set_plain_text(m_link_context_menu_url.to_string());
|
||||
}));
|
||||
m_link_context_menu->add_separator();
|
||||
m_link_context_menu->add_action(GUI::Action::create("Download", [this](auto&) {
|
||||
m_link_context_menu->add_action(GUI::Action::create("&Download", [this](auto&) {
|
||||
start_download(m_link_context_menu_url);
|
||||
}));
|
||||
|
||||
@ -196,22 +196,22 @@ Tab::Tab(Type type)
|
||||
};
|
||||
|
||||
m_image_context_menu = GUI::Menu::construct();
|
||||
m_image_context_menu->add_action(GUI::Action::create("Open image", [this](auto&) {
|
||||
m_image_context_menu->add_action(GUI::Action::create("&Open Image", [this](auto&) {
|
||||
hooks().on_link_click(m_image_context_menu_url, "", 0);
|
||||
}));
|
||||
m_image_context_menu->add_action(GUI::Action::create("Open image in new tab", [this](auto&) {
|
||||
m_image_context_menu->add_action(GUI::Action::create("Open Image in New &Tab", [this](auto&) {
|
||||
hooks().on_link_click(m_image_context_menu_url, "_blank", 0);
|
||||
}));
|
||||
m_image_context_menu->add_separator();
|
||||
m_image_context_menu->add_action(GUI::Action::create("Copy image", [this](auto&) {
|
||||
m_image_context_menu->add_action(GUI::Action::create("&Copy Image", [this](auto&) {
|
||||
if (m_image_context_menu_bitmap.is_valid())
|
||||
GUI::Clipboard::the().set_bitmap(*m_image_context_menu_bitmap.bitmap());
|
||||
}));
|
||||
m_image_context_menu->add_action(GUI::Action::create("Copy image URL", [this](auto&) {
|
||||
m_image_context_menu->add_action(GUI::Action::create("Copy Image &URL", [this](auto&) {
|
||||
GUI::Clipboard::the().set_plain_text(m_image_context_menu_url.to_string());
|
||||
}));
|
||||
m_image_context_menu->add_separator();
|
||||
m_image_context_menu->add_action(GUI::Action::create("Download", [this](auto&) {
|
||||
m_image_context_menu->add_action(GUI::Action::create("&Download", [this](auto&) {
|
||||
start_download(m_image_context_menu_url);
|
||||
}));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user