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

Browser: Add more tab options

Add more tab options to Browser: "Duplicate Tab" and "Close Other Tabs".
This commit is contained in:
TheFightingCatfish 2021-08-07 00:21:14 +08:00 committed by Andreas Kling
parent 8a0d465fbc
commit 9899addb1d
3 changed files with 15 additions and 0 deletions

View file

@ -337,6 +337,12 @@ Tab::Tab(BrowserWindow& window, Type type)
m_tab_context_menu->add_action(GUI::Action::create("&Close Tab", [this](auto&) {
on_tab_close_request(*this);
}));
m_tab_context_menu->add_action(GUI::Action::create("&Duplicate Tab", [this](auto&) {
on_tab_open_request(url());
}));
m_tab_context_menu->add_action(GUI::Action::create("Close &Other Tabs", [this](auto&) {
on_tab_close_other_request(*this);
}));
m_page_context_menu = GUI::Menu::construct();
m_page_context_menu->add_action(window.go_back_action());