summaryrefslogtreecommitdiff
path: root/src/settings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/settings.cpp')
-rw-r--r--src/settings.cpp25
1 files changed, 18 insertions, 7 deletions
diff --git a/src/settings.cpp b/src/settings.cpp
index d23e7def..2a440c19 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -23,8 +23,6 @@
#include "settings.h"
#include "settings.moc"
-// #include "ui_settings.h"
-
#include "browserapplication.h"
#include "browsermainwindow.h"
#include "cookiejar.h"
@@ -68,6 +66,7 @@ SettingsDialog::SettingsDialog(QWidget *parent)
loadFromSettings();
}
+
void SettingsDialog::loadDefaults()
{
QWebSettings *defaultSettings = QWebSettings::globalSettings();
@@ -87,6 +86,7 @@ void SettingsDialog::loadDefaults()
enablePlugins->setChecked(defaultSettings->testAttribute(QWebSettings::PluginsEnabled));
}
+
void SettingsDialog::loadFromSettings()
{
KConfig config("rekonqrc");
@@ -136,7 +136,8 @@ void SettingsDialog::loadFromSettings()
CookieJar::AcceptPolicy acceptCookies = acceptPolicyEnum.keyToValue( value.toLocal8Bit() ) == -1 ?
CookieJar::AcceptOnlyFromSitesNavigatedTo :
static_cast<CookieJar::AcceptPolicy>(acceptPolicyEnum.keyToValue( value.toLocal8Bit() ) );
- switch(acceptCookies) {
+ switch(acceptCookies)
+ {
case CookieJar::AcceptAlways:
acceptCombo->setCurrentIndex(0);
break;
@@ -177,6 +178,7 @@ void SettingsDialog::loadFromSettings()
}
+
void SettingsDialog::saveToSettings()
{
KConfig config("rekonqrc");
@@ -188,7 +190,8 @@ void SettingsDialog::saveToSettings()
int historyExpire = expireHistory->currentIndex();
int idx = -1;
- switch (historyExpire) {
+ switch (historyExpire)
+ {
case 0: idx = 1; break;
case 1: idx = 7; break;
case 2: idx = 14; break;
@@ -207,7 +210,8 @@ void SettingsDialog::saveToSettings()
group3.writeEntry(QString("enablePlugins"), enablePlugins->isChecked() );
CookieJar::KeepPolicy keepCookies;
- switch(acceptCombo->currentIndex()) {
+ switch(acceptCombo->currentIndex())
+ {
default:
case 0:
keepCookies = CookieJar::KeepUntilExpire;
@@ -224,7 +228,8 @@ void SettingsDialog::saveToSettings()
group3.writeEntry(QString("acceptCookies"), QString(acceptPolicyEnum.valueToKey(keepCookies) ) );
CookieJar::KeepPolicy keepPolicy;
- switch(keepUntilCombo->currentIndex()) {
+ switch(keepUntilCombo->currentIndex())
+ {
default:
case 0:
keepPolicy = CookieJar::KeepUntilExpire;
@@ -265,12 +270,14 @@ void SettingsDialog::showCookies()
dialog->exec();
}
+
void SettingsDialog::showExceptions()
{
CookiesExceptionsDialog *dialog = new CookiesExceptionsDialog(BrowserApplication::cookieJar(), this);
dialog->exec();
}
+
void SettingsDialog::chooseFont()
{
QFont myFont;
@@ -282,6 +289,7 @@ void SettingsDialog::chooseFont()
}
}
+
void SettingsDialog::chooseFixedFont()
{
@@ -294,12 +302,15 @@ void SettingsDialog::chooseFixedFont()
}
}
+
void SettingsDialog::setHomeToCurrentPage()
{
BrowserMainWindow *mw = static_cast<BrowserMainWindow*>(parent());
WebView *webView = mw->currentTab();
if (webView)
- homeLineEdit->setText(webView->url().toString());
+ {
+ homeLineEdit->setText( webView->url().prettyUrl() );
+ }
}