1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 21:08:12 +00:00

Ladybird: Add setting for page to open on new tab

This commit is contained in:
Federico Guerinoni 2023-01-21 00:30:05 +01:00 committed by Andrew Kaster
parent 80da16e54a
commit 17e9db4fa1
6 changed files with 26 additions and 9 deletions

View file

@ -305,7 +305,7 @@ BrowserWindow::BrowserWindow(Browser::CookieJar& cookie_jar, StringView webdrive
});
QObject::connect(new_tab_action, &QAction::triggered, this, [this] {
new_tab("about:blank", Activate::Yes);
new_tab(s_settings->new_tab_page(), Activate::Yes);
});
QObject::connect(settings_action, &QAction::triggered, this, [this] {
new SettingsDialog(this);
@ -319,8 +319,7 @@ BrowserWindow::BrowserWindow(Browser::CookieJar& cookie_jar, StringView webdrive
QObject::connect(m_tabs_container, &QTabWidget::tabCloseRequested, this, &BrowserWindow::close_tab);
QObject::connect(close_current_tab_action, &QAction::triggered, this, &BrowserWindow::close_current_tab);
// We need to load *something* to make the JS console usable.
new_tab("about:blank", Activate::Yes);
new_tab(s_settings->new_tab_page(), Activate::Yes);
setCentralWidget(m_tabs_container);
}