aboutsummaryrefslogtreecommitdiff
path: root/src/dialogs
diff options
context:
space:
mode:
authorMike Skec <skec@protonmail.ch>2021-01-21 21:30:50 +1100
committerFelix Queißner <felix@ib-queissner.de>2021-01-21 13:49:54 +0100
commit17a90d8dde55c5f0adc230c1a78da3dd2f8af995 (patch)
tree6773b5090e669535b7279cefee75f6d231ca4fac /src/dialogs
parent2091b038ef2a23a85d30d056307b3c405c416256 (diff)
downloadkristall-17a90d8dde55c5f0adc230c1a78da3dd2f8af995.tar.gz
new-tab button: add preference
Diffstat (limited to 'src/dialogs')
-rw-r--r--src/dialogs/settingsdialog.cpp6
-rw-r--r--src/dialogs/settingsdialog.hpp2
-rw-r--r--src/dialogs/settingsdialog.ui23
3 files changed, 25 insertions, 6 deletions
diff --git a/src/dialogs/settingsdialog.cpp b/src/dialogs/settingsdialog.cpp
index 0925578..229a728 100644
--- a/src/dialogs/settingsdialog.cpp
+++ b/src/dialogs/settingsdialog.cpp
@@ -250,6 +250,7 @@ void SettingsDialog::setOptions(const GenericSettings &options)
this->ui->network_timeout->setValue(this->current_options.network_timeout);
this->ui->enable_home_btn->setChecked(this->current_options.enable_home_btn);
+ this->ui->enable_newtab_btn->setChecked(this->current_options.enable_newtab_btn);
this->ui->cache_limit->setValue(this->current_options.cache_limit);
this->ui->cache_threshold->setValue(this->current_options.cache_threshold);
@@ -678,6 +679,11 @@ void SettingsDialog::on_enable_home_btn_clicked(bool checked)
this->current_options.enable_home_btn = checked;
}
+void SettingsDialog::on_enable_newtab_btn_clicked(bool checked)
+{
+ this->current_options.enable_newtab_btn = checked;
+}
+
void SettingsDialog::on_cache_limit_valueChanged(int limit)
{
this->current_options.cache_limit = limit;
diff --git a/src/dialogs/settingsdialog.hpp b/src/dialogs/settingsdialog.hpp
index dac7a10..6638583 100644
--- a/src/dialogs/settingsdialog.hpp
+++ b/src/dialogs/settingsdialog.hpp
@@ -132,6 +132,8 @@ private slots:
void on_enable_home_btn_clicked(bool arg1);
+ void on_enable_newtab_btn_clicked(bool arg1);
+
void on_cache_limit_valueChanged(int limit);
void on_cache_threshold_valueChanged(int thres);
diff --git a/src/dialogs/settingsdialog.ui b/src/dialogs/settingsdialog.ui
index 2eb04da..9678166 100644
--- a/src/dialogs/settingsdialog.ui
+++ b/src/dialogs/settingsdialog.ui
@@ -365,13 +365,23 @@
</widget>
</item>
<item row="13" column="1">
- <widget class="QCheckBox" name="enable_home_btn">
- <property name="text">
- <string>Home</string>
- </property>
- </widget>
+ <layout class="QHBoxLayout" name="horizontalLayout_99">
+ <item>
+ <widget class="QCheckBox" name="enable_home_btn">
+ <property name="text">
+ <string>Home</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="enable_newtab_btn">
+ <property name="text">
+ <string>New tab</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
</item>
-
<item row="14" column="0">
<widget class="QLabel" name="label_30">
<property name="text">
@@ -1075,6 +1085,7 @@
<tabstop>redirection_mode</tabstop>
<tabstop>network_timeout</tabstop>
<tabstop>enable_home_btn</tabstop>
+ <tabstop>enable_newtab_btn</tabstop>
<tabstop>bg_change_color</tabstop>
<tabstop>style_preview</tabstop>
<tabstop>std_change_font</tabstop>