diff options
| author | Andrea Diamantini <adjam7@gmail.com> | 2009-09-24 02:01:24 +0200 | 
|---|---|---|
| committer | Andrea Diamantini <adjam7@gmail.com> | 2009-09-24 02:01:24 +0200 | 
| commit | 9c086fcd342910b5e60f80c7bc893dfbe2591418 (patch) | |
| tree | 84037e78174f2b11ef471149130212121b7ae02e | |
| parent | css homepage improvements (diff) | |
| download | rekonq-9c086fcd342910b5e60f80c7bc893dfbe2591418.tar.xz | |
Fixed not found page to let translators work on it..
| -rw-r--r-- | data/home.html | 3 | ||||
| -rw-r--r-- | data/notfound.html | 95 | ||||
| -rw-r--r-- | 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 @@  <head>  <title>rekonq home page</title> -<style  type="text/css"> + +<style type="text/css">  html{  margin:0; diff --git a/data/notfound.html b/data/notfound.html index 673ebe70..e34bfc6d 100644 --- a/data/notfound.html +++ b/data/notfound.html @@ -2,65 +2,64 @@  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">  <head>  <title>%1</title> -<style  type="text/css"> -body { -  padding: 3em 0em; -  background: #eeeeee; + +<style type="text/css"> + +html{ +margin:0; +padding:0;  } -hr { -  color: lightgray; -  width: 100%; + +body{ +background: url(%2/tile.gif) repeat-x #fff; +margin:0; +padding:0; +font-family: sans-serif; +font-size: 100%;  } -img { -  float: left; -  opacity: .8; + +#block { +/* background: url(%2/bot.gif) bottom center #f3f3f3; */ +border: 2px solid #d9d9d9; +padding: 10px; +width: 600px; +margin: 150px auto; +color: #444; + +/*font-weight: bold; +clear: right;*/  } -#box { -  background: white; -  border: 1px solid lightgray; -  width: 600px; -  padding: 60px; -  margin: auto; + +h1{ +font-size: 130%; +font-weight: bold; +border-bottom: 1px solid lightgray; +margin-left: 48px;  } -h1 { -  font-size: 130%; -  font-weight: bold; -  border-bottom: 1px solid lightgray; -  margin-left: 48px; -} -h2 { -  font-size: 100%; -  font-weight: normal; -  border-bottom: 1px solid lightgray; -  margin-left: 48px; + +h2{ +font-size: 100%; +font-weight: normal; +border-bottom: 1px solid lightgray; +margin-left: 48px;  } +  ul { -  font-size: 80%; -  padding-left: 48px; -  margin: 0; +padding: 12px 48px; +margin: 0;  } +  #reloadButton { -  padding-left: 48px; +margin-left: 48px; +margin-bottom: 12px;  } +  </style> +  </head> +  <body> -  <div id="box"> -    <img src="%2" width="16" height="16" alt="Not found" /> -    <h1>%3</h1> -    <h2>When connecting to: %4</h2> -    <ul> -      <li>Check the address for errors such as <b>ww</b>.kde.org -      instead of <b>www</b>.kde.org</li> -      <li>If the address is correct, try to check the network -      connection.</li> -      <li>If your computer or network is protected by a firewall or -      proxy, make sure that rekonq is permitted to access -      the network.</li> -      <li>Of course, if rekonq doesn't work properly, you can always  -      say it's a programmer error ;)</li> -    </ul> -    <br/><br/> -  </div> +<div id="block">%3</div>  </body> +  </html> 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;  } | 
