From d69ddcbc4f520a84b8e6b56fa5957beea9d78b0b Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Tue, 1 Feb 2011 18:19:52 +0100 Subject: This is a simpler version of the zoom save settings patch. It allows saving zoom settings for each website (saving settings per host) and loads them on loadFinished. Needs testing. --- src/webpage.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/webpage.cpp') diff --git a/src/webpage.cpp b/src/webpage.cpp index c074f1ad..7a7793ec 100644 --- a/src/webpage.cpp +++ b/src/webpage.cpp @@ -532,7 +532,7 @@ void WebPage::handleUnsupportedContent(QNetworkReply *reply) void WebPage::loadStarted() { - // HACK: + // HACK: // Chinese encoding Fix. See BUG: 251264 // Use gb18030 instead of gb2312 if(settings()->defaultTextEncoding() == QL1S("gb2312")) @@ -545,6 +545,16 @@ void WebPage::loadFinished(bool ok) { Q_UNUSED(ok); + // set zoom factor + QString val; + KSharedConfig::Ptr config = KGlobal::config(); + KConfigGroup group( config, "Zoom" ); + val = group.readEntry(_loadingUrl.host(), QString("10")); + + int value = val.toInt(); + kDebug() << "ZOOM VALUE: " << _loadingUrl.host() << value; + mainFrame()->setZoomFactor(QVariant(value).toReal() / 10); // Don't allox max +1 values + // Provide site icon. Can this be moved to loadStarted?? Application::iconManager()->provideIcon(this, _loadingUrl); -- cgit v1.2.1