summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-05-18 01:52:30 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-05-18 01:52:30 +0200
commit86fb9120221cff8d7fbc605c71f6418fa6f81833 (patch)
treee71e37b0423f07e0ec1642afd6bce409cfc014ba /src
parentAdd option to choose new tab page as home page (diff)
downloadrekonq-86fb9120221cff8d7fbc605c71f6418fa6f81833.tar.xz
Moved setEncoding action to be a local page settings as it seems
more useful
Diffstat (limited to 'src')
-rw-r--r--src/application.cpp4
-rw-r--r--src/mainwindow.cpp9
-rw-r--r--src/rekonq.kcfg5
3 files changed, 6 insertions, 12 deletions
diff --git a/src/application.cpp b/src/application.cpp
index bfa9c03f..0e31002c 100644
--- a/src/application.cpp
+++ b/src/application.cpp
@@ -414,11 +414,9 @@ void Application::updateConfiguration()
else
view->tabBar()->setSelectionBehaviorOnRemove(QTabBar::SelectRightTab);
- // =========== Encodings & Fonts ==============
+ // =========== Fonts ==============
QWebSettings *defaultSettings = QWebSettings::globalSettings();
- defaultSettings->setDefaultTextEncoding(ReKonfig::defaultEncoding());
-
int fnSize = ReKonfig::fontSize();
int minFnSize = ReKonfig::minFontSize();
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 84d79c40..527e5020 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -499,6 +499,8 @@ void MainWindow::setupTools()
zoomAction->setDefaultWidget(zoomWidget);
toolsMenu->addAction(zoomAction);
+ toolsMenu->addAction(actionByName(QL1S("encodings")));
+
toolsMenu->addSeparator();
toolsMenu->addAction(actionByName(QL1S("private_browsing")));
@@ -521,8 +523,6 @@ void MainWindow::setupTools()
toolsMenu->addSeparator();
- toolsMenu->addAction(actionByName(QL1S("encodings")));
-
helpMenu()->setIcon(KIcon("help-browser"));
toolsMenu->addAction(helpMenu()->menuAction());
toolsMenu->addAction(actionByName(KStandardAction::name(KStandardAction::Preferences)));
@@ -1286,8 +1286,7 @@ void MainWindow::setEncoding(QAction *qa)
QString currentCodec = qa->text().toLatin1();
currentCodec = currentCodec.remove('&');
kDebug() << currentCodec;
- QWebSettings::globalSettings()->setDefaultTextEncoding(currentCodec);
- ReKonfig::setDefaultEncoding(currentCodec);
+ currentTab()->page()->settings()->setDefaultTextEncoding(currentCodec);
}
@@ -1301,7 +1300,7 @@ void MainWindow::populateEncodingMenu()
}
codecs.sort();
- QString currentCodec = ReKonfig::defaultEncoding();
+ QString currentCodec = currentTab()->page()->settings()->defaultTextEncoding();
kDebug() << "Current Codec: " << currentCodec;
m_encodingMenu->clear();
diff --git a/src/rekonq.kcfg b/src/rekonq.kcfg
index fa4a236d..9aa30e35 100644
--- a/src/rekonq.kcfg
+++ b/src/rekonq.kcfg
@@ -29,9 +29,6 @@
<entry name="recoverOnCrash" type="Int">
<default>0</default>
</entry>
- <entry name="defaultEncoding" type="String">
- <default>UTF-8</default>
- </entry>
</group>
@@ -185,7 +182,7 @@
<default>https://easylist-downloads.adblockplus.org/easylist.txt</default>
</entry>
<entry name="lastUpdate" type="DateTime">
- <default>QDateTime(QDate(2009,03,13))</default>
+ <default code="true">QDateTime(QDate(2009,03,13))</default>
</entry>
<entry name="updateInterval" type="Int">
<default>7</default>