1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +01:00

Added "broken page" image to speed dial when loading fails.

+ updated translations
This commit is contained in:
nowrep 2011-12-11 12:34:51 +01:00
parent 65f4bf1a1b
commit 4f8454a3d9
12 changed files with 27 additions and 15 deletions

View File

@ -19,5 +19,6 @@
<file>html/loading.gif</file>
<file>html/reload.png</file>
<file>html/qupzilla.ico</file>
<file>html/broken-page.png</file>
</qresource>
</RCC>

View File

@ -166,12 +166,18 @@ void SpeedDial::thumbnailCreated(const QPixmap &image)
QString url = thumbnailer->url().toString();
QString fileName = m_thumbnailsDir + QCryptographicHash::hash(url.toUtf8(), QCryptographicHash::Md4).toHex() + ".png";
if (!image.save(fileName)) {
qWarning() << "SpeedDial::thumbnailCreated Cannot save thumbnail to " << fileName;
if (image.isNull()) {
fileName = "qrc:/html/broken-page.png";
}
else {
if (!image.save(fileName)) {
qWarning() << "SpeedDial::thumbnailCreated Cannot save thumbnail to " << fileName;
}
fileName = QUrl::fromLocalFile(fileName).toString();
}
m_regenerateScript = true;
fileName = QUrl::fromLocalFile(fileName).toString();
for (int i = 0; i < m_webFrames.count(); i++) {
QWebFrame* frame = m_webFrames.at(i).data();

View File

@ -86,11 +86,16 @@ void PageThumbnailer::start()
{
m_page->mainFrame()->load(m_url);
connect(m_page, SIGNAL(loadFinished(bool)), this, SLOT(createThumbnail()));
connect(m_page, SIGNAL(loadFinished(bool)), this, SLOT(createThumbnail(bool)));
}
void PageThumbnailer::createThumbnail()
void PageThumbnailer::createThumbnail(bool status)
{
if (!status) {
emit thumbnailCreated(QPixmap());
return;
}
QImage image(m_page->viewportSize(), QImage::Format_ARGB32);
QPainter painter(&image);
m_page->mainFrame()->render(&painter);

View File

@ -56,7 +56,7 @@ signals:
public slots:
private slots:
void createThumbnail();
void createThumbnail(bool status);
private:
QWebPage* m_page;

View File

@ -4384,7 +4384,7 @@ Po přidání či odstranění cest k certifikátům je nutné k projevení změ
<translation>Hledat &quot;%1 ..&quot; s %2</translation>
</message>
<message>
<location filename="../src/webview/webview.cpp" line="887"/>
<location filename="../src/webview/webview.cpp" line="890"/>
<source>No Named Page</source>
<translation>Bezejmenná stránka</translation>
</message>

View File

@ -4380,7 +4380,7 @@ Nachdem Speicherpfade hinzugefügt oder gelöscht wurden, muss QupZilla neu gest
<translation>Suche &quot;%1 ..&quot; mit %2</translation>
</message>
<message>
<location filename="../src/webview/webview.cpp" line="887"/>
<location filename="../src/webview/webview.cpp" line="890"/>
<source>No Named Page</source>
<translation>Unbekannte Seite</translation>
</message>

View File

@ -4398,7 +4398,7 @@ Después de añadir o quitar rutas de certificados, es necesario reiniciar QupZi
<translation>Buscar &quot;%1 ..&quot; con %2</translation>
</message>
<message>
<location filename="../src/webview/webview.cpp" line="887"/>
<location filename="../src/webview/webview.cpp" line="890"/>
<source>No Named Page</source>
<translation>Página en blanco</translation>
</message>
@ -4411,4 +4411,4 @@ Después de añadir o quitar rutas de certificados, es necesario reiniciar QupZi
<translation>Prevenir que esta página cree diálogos adicionales</translation>
</message>
</context>
</TS>
</TS>

View File

@ -4402,7 +4402,7 @@ Dopo l&apos;aggiunta o la rimozione dei percorsi di certificazione, è necessari
<translation>Cerca &quot;%1 ..&quot; con %2</translation>
</message>
<message>
<location filename="../src/webview/webview.cpp" line="887"/>
<location filename="../src/webview/webview.cpp" line="890"/>
<source>No Named Page</source>
<translation>Pagina Senza Nome</translation>
</message>

View File

@ -4380,7 +4380,7 @@ Na het toevoegen of verwijderen van paden, is het noodzakelijk om de browser te
<translation>Zoek &quot;%1 ..&quot; met %2</translation>
</message>
<message>
<location filename="../src/webview/webview.cpp" line="887"/>
<location filename="../src/webview/webview.cpp" line="890"/>
<source>No Named Page</source>
<translation>Niet benoemde pagina</translation>
</message>

View File

@ -4467,7 +4467,7 @@ Nachdem Speicherpfade hinzugefügt oder gelöscht wurden, muss QupZilla neu gest
<translation>Suche &quot;%1 ..&quot; mit %2</translation>
</message>
<message>
<location filename="../src/webview/webview.cpp" line="887"/>
<location filename="../src/webview/webview.cpp" line="890"/>
<source>No Named Page</source>
<translation>Unbekannte Seite</translation>
</message>

View File

@ -4377,7 +4377,7 @@ Po pridaní či odobratí ciest k certifikátom je nutné reštartovať prehliad
<translation>Hľadať &quot;%1 ..&quot; s %2</translation>
</message>
<message>
<location filename="../src/webview/webview.cpp" line="887"/>
<location filename="../src/webview/webview.cpp" line="890"/>
<source>No Named Page</source>
<translation>Nepomenovaná stránka</translation>
</message>

View File

@ -4393,7 +4393,7 @@ After adding or removing certificate paths, it is neccessary to restart QupZilla
<translation>使 %2&quot;%1 ..&quot; </translation>
</message>
<message>
<location filename="../src/webview/webview.cpp" line="887"/>
<location filename="../src/webview/webview.cpp" line="890"/>
<source>No Named Page</source>
<translation></translation>
</message>