mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:37:44 +00:00
Browser: Add more tab options
Add more tab options to Browser: "Duplicate Tab" and "Close Other Tabs".
This commit is contained in:
parent
8a0d465fbc
commit
9899addb1d
3 changed files with 15 additions and 0 deletions
|
@ -542,6 +542,14 @@ void BrowserWindow::create_new_tab(URL url, bool activate)
|
|||
});
|
||||
};
|
||||
|
||||
new_tab.on_tab_close_other_request = [this](auto& tab) {
|
||||
m_tab_widget->deferred_invoke([this, &tab](auto&) {
|
||||
m_tab_widget->remove_all_tabs_except(tab);
|
||||
VERIFY(m_tab_widget->children().size() == 1);
|
||||
m_tab_widget->set_bar_visible(false);
|
||||
});
|
||||
};
|
||||
|
||||
new_tab.on_get_cookie = [this](auto& url, auto source) -> String {
|
||||
return m_cookie_jar.get_cookie(url, source);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue