From 9c086fcd342910b5e60f80c7bc893dfbe2591418 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Thu, 24 Sep 2009 02:01:24 +0200 Subject: Fixed not found page to let translators work on it.. --- data/home.html | 3 +- data/notfound.html | 95 +++++++++++++++++++++++++++--------------------------- src/webpage.cpp | 22 ++++++++++--- 3 files changed, 66 insertions(+), 54 deletions(-) diff --git a/data/home.html b/data/home.html index c6992f47..b5ca9b67 100644 --- a/data/home.html +++ b/data/home.html @@ -3,7 +3,8 @@ rekonq home page - + + -
- Not found -

%3

-

When connecting to: %4

- -

-
+
%3
+ diff --git a/src/webpage.cpp b/src/webpage.cpp index d5d1cd7c..7408b490 100644 --- a/src/webpage.cpp +++ b/src/webpage.cpp @@ -224,15 +224,27 @@ QString WebPage::errorPage(QNetworkReply *reply) kWarning() << "Couldn't open the notfound.html file"; return QString(""); } - QString title = i18n("Error loading page: ") + reply->url().toString(); - QString imagePath = KIconLoader::global()->iconPath("rekonq", KIconLoader::NoGroup, false); + QString title = i18n("Error loading: ") + reply->url().path(); + + QString imagesPath = QString("file://") + KGlobal::dirs()->findResourceDir("data", "rekonq/pics/bg.png") + QString("rekonq/pics"); + QString msg = "

" + reply->errorString() + "

"; + + msg += "

" + i18n("When connecting to: ") + reply->url().toString() + "

"; + msg += "

"; + msg += "url().path() + "';\" value=\""; + msg += i18n("Try Again") + "\" />"; + QString html = QString(QLatin1String(file.readAll())) .arg(title) - .arg("file://" + imagePath) - .arg(reply->errorString()) - .arg(reply->url().toString()); + .arg(imagesPath) + .arg(msg) + ; return html; } -- cgit v1.2.1