summaryrefslogtreecommitdiff
path: root/src/settings
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-05-18 01:04:36 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-05-18 01:04:36 +0200
commit118dff93740d3f8e20dc57e2c2b92b9ad30bd58a (patch)
tree6d0520865a88c0d0be4a809c37079afa6749f2e4 /src/settings
parentFix crashes on file:// urls (diff)
downloadrekonq-118dff93740d3f8e20dc57e2c2b92b9ad30bd58a.tar.xz
Add option to choose new tab page as home page
BUG:235106
Diffstat (limited to 'src/settings')
-rw-r--r--src/settings/settings_general.ui13
-rw-r--r--src/settings/settingsdialog.cpp11
-rw-r--r--src/settings/settingsdialog.h1
3 files changed, 22 insertions, 3 deletions
diff --git a/src/settings/settings_general.ui b/src/settings/settings_general.ui
index ccc3fa20..f7771cbc 100644
--- a/src/settings/settings_general.ui
+++ b/src/settings/settings_general.ui
@@ -79,7 +79,7 @@
<string>Home Page</string>
</property>
<layout class="QFormLayout" name="formLayout_2">
- <item row="0" column="0">
+ <item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
@@ -101,7 +101,7 @@
</property>
</widget>
</item>
- <item row="0" column="1">
+ <item row="1" column="1">
<widget class="KLineEdit" name="kcfg_homePage">
<property name="enabled">
<bool>true</bool>
@@ -114,7 +114,7 @@
</property>
</widget>
</item>
- <item row="1" column="1">
+ <item row="2" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QPushButton" name="setHomeToCurrentPageButton">
@@ -138,6 +138,13 @@
</item>
</layout>
</item>
+ <item row="0" column="1">
+ <widget class="QCheckBox" name="kcfg_useNewTabPage">
+ <property name="text">
+ <string>Use New Tab Page</string>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</item>
diff --git a/src/settings/settingsdialog.cpp b/src/settings/settingsdialog.cpp
index d2d5c0d0..3f701c5b 100644
--- a/src/settings/settingsdialog.cpp
+++ b/src/settings/settingsdialog.cpp
@@ -151,6 +151,10 @@ SettingsDialog::SettingsDialog(QWidget *parent)
connect(d->generalUi.setHomeToCurrentPageButton, SIGNAL(clicked()), this, SLOT(setHomeToCurrentPage()));
+ // new tab page
+ disableHomeSettings(ReKonfig::useNewTabPage());
+ connect(d->generalUi.kcfg_useNewTabPage, SIGNAL(toggled(bool)), this, SLOT(disableHomeSettings(bool)));
+
// update buttons
connect(d->adBlockWidg, SIGNAL(changed(bool)), this, SLOT(updateButtons()));
connect(d->networkWidg, SIGNAL(changed(bool)), this, SLOT(updateButtons()));
@@ -239,3 +243,10 @@ void SettingsDialog::setHomeToCurrentPage()
d->generalUi.kcfg_homePage->setText(webTab->url().prettyUrl());
}
}
+
+
+void SettingsDialog::disableHomeSettings(bool b)
+{
+ d->generalUi.kcfg_homePage->setEnabled(!b);
+ d->generalUi.setHomeToCurrentPageButton->setEnabled(!b);
+}
diff --git a/src/settings/settingsdialog.h b/src/settings/settingsdialog.h
index 25b2fe9b..cade78e3 100644
--- a/src/settings/settingsdialog.h
+++ b/src/settings/settingsdialog.h
@@ -59,6 +59,7 @@ private slots:
void saveSettings();
void setHomeToCurrentPage();
+ void disableHomeSettings(bool);
};
#endif // SETTINGS_DIALOG_H