summaryrefslogtreecommitdiff
path: root/src/webpage.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2011-02-01 18:19:52 +0100
committerAndrea Diamantini <adjam7@gmail.com>2011-02-01 18:19:52 +0100
commitd69ddcbc4f520a84b8e6b56fa5957beea9d78b0b (patch)
treef755150209a0fc3abf737556115c9c2b9a9da0e8 /src/webpage.cpp
parentAdded pulldown menu for multiple steps to the "Forward History" button (diff)
downloadrekonq-d69ddcbc4f520a84b8e6b56fa5957beea9d78b0b.tar.xz
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.
Diffstat (limited to 'src/webpage.cpp')
-rw-r--r--src/webpage.cpp12
1 files changed, 11 insertions, 1 deletions
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);