mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:04:59 +00:00
Browser: Implement notify_request_open_new_tab
This commit is contained in:
parent
640864b32e
commit
9d79a9b214
3 changed files with 9 additions and 2 deletions
|
@ -565,7 +565,7 @@ void BrowserWindow::set_window_title_for_tab(Tab const& tab)
|
|||
set_title(DeprecatedString::formatted("{} - Browser", title.is_empty() ? url.to_deprecated_string() : title));
|
||||
}
|
||||
|
||||
void BrowserWindow::create_new_tab(URL url, bool activate)
|
||||
Tab& BrowserWindow::create_new_tab(URL url, bool activate)
|
||||
{
|
||||
auto& new_tab = m_tab_widget->add_tab<Browser::Tab>("New tab"_short_string, *this);
|
||||
|
||||
|
@ -652,6 +652,8 @@ void BrowserWindow::create_new_tab(URL url, bool activate)
|
|||
|
||||
if (activate)
|
||||
m_tab_widget->set_active_widget(&new_tab);
|
||||
|
||||
return new_tab;
|
||||
}
|
||||
|
||||
void BrowserWindow::create_new_window(URL url)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue