diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/webpage.cpp | 22 | 
1 files changed, 17 insertions, 5 deletions
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 = "<h1>" + reply->errorString() + "</h1>"; +     +    msg += "<h2>" + i18n("When connecting to: ") + reply->url().toString() + "</h2>"; +    msg += "<ul><li>" + i18n("Check the address for errors such as <b>ww</b>.kde.org instead of <b>www</b>.kde.org"); +    msg += "</li><li>" + i18n("If the address is correct, try to check the network connection.") + "</li><li>" ; +    msg += i18n("If your computer or network is protected by a firewall or proxy, make sure that rekonq is permitted to access the network."); +    msg += "</li><li>" + i18n("Of course, if rekonq doesn't work properly, you can always say it's a programmer error ;)"); +    msg += "</li></ul><br/><br/>"; +    msg += "<input type=\"button\" id=\"reloadButton\" onClick=\"document.location.href='" + reply->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;  }  | 
