From 86fb9120221cff8d7fbc605c71f6418fa6f81833 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Tue, 18 May 2010 01:52:30 +0200 Subject: Moved setEncoding action to be a local page settings as it seems more useful --- src/application.cpp | 4 +--- src/mainwindow.cpp | 9 ++++----- src/rekonq.kcfg | 5 +---- 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 @@ 0 - - UTF-8 - @@ -185,7 +182,7 @@ https://easylist-downloads.adblockplus.org/easylist.txt - QDateTime(QDate(2009,03,13)) + QDateTime(QDate(2009,03,13)) 7 -- cgit v1.2.1