summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Ladybird/Settings.cpp10
-rw-r--r--Ladybird/Settings.h3
-rw-r--r--Ladybird/SettingsDialog.cpp5
-rw-r--r--Ladybird/SettingsDialog.h1
-rw-r--r--Ladybird/Tab.cpp9
-rw-r--r--Ladybird/Tab.h2
-rw-r--r--Ladybird/main.cpp5
7 files changed, 2 insertions, 33 deletions
diff --git a/Ladybird/Settings.cpp b/Ladybird/Settings.cpp
index 56baafb05d..c581ae83a1 100644
--- a/Ladybird/Settings.cpp
+++ b/Ladybird/Settings.cpp
@@ -13,16 +13,6 @@ Settings::Settings()
m_qsettings = new QSettings("Serenity", "Ladybird", this);
}
-QString Settings::homepage()
-{
- return m_qsettings->value("homepage", "https://www.serenityos.org/").toString();
-}
-
-void Settings::set_homepage(QString const& homepage)
-{
- m_qsettings->setValue("homepage", homepage);
-}
-
QString Settings::new_tab_page()
{
return m_qsettings->value("new_tab_page", "about:blank").toString();
diff --git a/Ladybird/Settings.h b/Ladybird/Settings.h
index 5dea619bb0..e23448bc6c 100644
--- a/Ladybird/Settings.h
+++ b/Ladybird/Settings.h
@@ -15,9 +15,6 @@ class Settings : public QObject {
public:
Settings();
- QString homepage();
- void set_homepage(QString const& homepage);
-
QString new_tab_page();
void set_new_tab_page(QString const& page);
diff --git a/Ladybird/SettingsDialog.cpp b/Ladybird/SettingsDialog.cpp
index a91231cce4..f6027e43c3 100644
--- a/Ladybird/SettingsDialog.cpp
+++ b/Ladybird/SettingsDialog.cpp
@@ -15,16 +15,12 @@ SettingsDialog::SettingsDialog(QMainWindow* window)
: m_window(window)
{
m_layout = new QFormLayout(this);
- m_homepage = new QLineEdit(this);
m_new_tab_page = new QLineEdit(this);
m_ok_button = new QPushButton("&Save", this);
- m_layout->addRow(new QLabel("HomePage", this), m_homepage);
m_layout->addRow(new QLabel("Page on New Tab", this), m_new_tab_page);
m_layout->addWidget(m_ok_button);
- m_homepage->setText(s_settings->homepage());
-
QObject::connect(m_ok_button, &QPushButton::released, this, [this] {
close();
});
@@ -46,6 +42,5 @@ void SettingsDialog::closeEvent(QCloseEvent* event)
void SettingsDialog::save()
{
// FIXME: Validate data.
- s_settings->set_homepage(m_homepage->text());
s_settings->set_new_tab_page(m_new_tab_page->text());
}
diff --git a/Ladybird/SettingsDialog.h b/Ladybird/SettingsDialog.h
index 412186bfe1..cfeeff0b07 100644
--- a/Ladybird/SettingsDialog.h
+++ b/Ladybird/SettingsDialog.h
@@ -24,7 +24,6 @@ public:
private:
QFormLayout* m_layout;
QPushButton* m_ok_button { nullptr };
- QLineEdit* m_homepage { nullptr };
QLineEdit* m_new_tab_page { nullptr };
QMainWindow* m_window { nullptr };
};
diff --git a/Ladybird/Tab.cpp b/Ladybird/Tab.cpp
index aff795dee7..456fd416ca 100644
--- a/Ladybird/Tab.cpp
+++ b/Ladybird/Tab.cpp
@@ -47,7 +47,6 @@ Tab::Tab(BrowserWindow* window, StringView webdriver_content_ipc_path, WebView::
auto back_icon_path = QString("%1/res/icons/16x16/go-back.png").arg(s_serenity_resource_root.characters());
auto forward_icon_path = QString("%1/res/icons/16x16/go-forward.png").arg(s_serenity_resource_root.characters());
- auto home_icon_path = QString("%1/res/icons/16x16/go-home.png").arg(s_serenity_resource_root.characters());
auto reload_icon_path = QString("%1/res/icons/16x16/reload.png").arg(s_serenity_resource_root.characters());
m_back_action = make<QAction>(QIcon(back_icon_path), "Back");
m_back_action->setEnabled(false);
@@ -55,14 +54,12 @@ Tab::Tab(BrowserWindow* window, StringView webdriver_content_ipc_path, WebView::
m_forward_action = make<QAction>(QIcon(forward_icon_path), "Forward");
m_forward_action->setEnabled(false);
m_forward_action->setShortcuts(QKeySequence::keyBindings(QKeySequence::StandardKey::Forward));
- m_home_action = make<QAction>(QIcon(home_icon_path), "Home");
m_reload_action = make<QAction>(QIcon(reload_icon_path), "Reload");
m_reload_action->setShortcuts(QKeySequence::keyBindings(QKeySequence::StandardKey::Refresh));
m_toolbar->addAction(m_back_action);
m_toolbar->addAction(m_forward_action);
m_toolbar->addAction(m_reload_action);
- m_toolbar->addAction(m_home_action);
m_toolbar->addWidget(m_location_edit);
m_reset_zoom_button->setToolTip("Reset zoom level");
m_reset_zoom_button_action = m_toolbar->addWidget(m_reset_zoom_button);
@@ -127,7 +124,6 @@ Tab::Tab(BrowserWindow* window, StringView webdriver_content_ipc_path, WebView::
QObject::connect(m_back_action, &QAction::triggered, this, &Tab::back);
QObject::connect(m_forward_action, &QAction::triggered, this, &Tab::forward);
- QObject::connect(m_home_action, &QAction::triggered, this, &Tab::home);
QObject::connect(m_reload_action, &QAction::triggered, this, &Tab::reload);
QObject::connect(focus_location_editor_action, &QAction::triggered, this, &Tab::focus_location_editor);
@@ -214,11 +210,6 @@ void Tab::forward()
view().load(m_history.current().url.to_deprecated_string());
}
-void Tab::home()
-{
- navigate(s_settings->homepage());
-}
-
void Tab::reload()
{
m_is_history_navigation = true;
diff --git a/Ladybird/Tab.h b/Ladybird/Tab.h
index 5a0a45906d..527b2a6ba1 100644
--- a/Ladybird/Tab.h
+++ b/Ladybird/Tab.h
@@ -43,7 +43,6 @@ public slots:
void page_favicon_changed(QIcon);
void back();
void forward();
- void home();
void reload();
signals:
@@ -68,7 +67,6 @@ private:
OwnPtr<QAction> m_back_action;
OwnPtr<QAction> m_forward_action;
- OwnPtr<QAction> m_home_action;
OwnPtr<QAction> m_reload_action;
int tab_index();
diff --git a/Ladybird/main.cpp b/Ladybird/main.cpp
index 78ce8ba6ff..e1cc780002 100644
--- a/Ladybird/main.cpp
+++ b/Ladybird/main.cpp
@@ -106,9 +106,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
if (auto url = TRY(get_formatted_url(raw_url)); url.is_valid()) {
window.view().load(url);
- } else if (!s_settings->homepage().isEmpty()) {
- auto home_url = TRY(ak_string_from_qstring(s_settings->homepage()));
- window.view().load(TRY(get_formatted_url(home_url.bytes_as_string_view())));
+ } else {
+ window.view().load("about:blank"sv);
}
return event_loop.exec();