From 79f825c173ebd7d3e29e3190bb2cc8fe77523ab2 Mon Sep 17 00:00:00 2001 From: nowrep Date: Sat, 3 Dec 2011 15:33:23 +0100 Subject: [PATCH] Edited Speed Dial to work in Windows. - prepending file:/// instead of file:// - also disabled user selection in all page (selection in inputs allowed) --- README.md | 2 +- src/data/html/speeddial.html | 6 +++--- src/plugins/speeddial.cpp | 12 +++++++++++- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 9816adb4a..679f2fa05 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ QupZilla Web Browser - http://www.qupzilla.co.cc (http://qupzilla.blogspot.com/) About QupZilla ---------------------------------------------------------------------------------------- -QupZilla is a new, very fast QtWebKit browser. It aims to be a lightweight web browser +QupZilla is a new and very fast QtWebKit browser. It aims to be a lightweight web browser available through all major platforms. This project has been originally started only for educational purposes. But from its start, QupZilla has grown into a feature-rich browser. diff --git a/src/data/html/speeddial.html b/src/data/html/speeddial.html index 884d56eb5..b95ff0752 100644 --- a/src/data/html/speeddial.html +++ b/src/data/html/speeddial.html @@ -3,8 +3,8 @@ %SITE-TITLE% diff --git a/src/plugins/speeddial.cpp b/src/plugins/speeddial.cpp index 772a17e93..6bb5a276c 100644 --- a/src/plugins/speeddial.cpp +++ b/src/plugins/speeddial.cpp @@ -86,7 +86,11 @@ QString SpeedDial::initialScript() } } else { +#ifdef Q_WS_X11 imgSource.prepend("file://"); +#else + imgSource.prepend("file:///"); +#endif } m_initialScript.append(QString("addBox('%1', '%2', '%3');\n").arg(url, title, imgSource)); @@ -146,6 +150,12 @@ void SpeedDial::thumbnailCreated(const QPixmap &image) continue; } - frame->evaluateJavaScript(QString("setImageToUrl('%1', '%2');").arg(url, "file://" + fileName)); +#ifdef Q_WS_X11 + fileName.prepend("file://"); +#else + fileName.prepend("file:///"); +#endif + + frame->evaluateJavaScript(QString("setImageToUrl('%1', '%2');").arg(url, fileName)); } }