summaryrefslogtreecommitdiff
path: root/src/webpage.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-04-22 01:42:58 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-04-22 01:42:58 +0200
commit1d2e4946e7650466a21acc6d2abb19740a63d431 (patch)
tree411406e7a02e77492a215904316b64f3fa55b73a /src/webpage.cpp
parentFix embed kpart bahevior. Try embedding just when there is a ReadOnlyPart (diff)
downloadrekonq-1d2e4946e7650466a21acc6d2abb19740a63d431.tar.xz
Fix, improve and clean WebSnap API.
This led me to a little polish in the classes using the WebSnap facilities and to change the mechanism the NewTabPage retrieves images from the "cache"
Diffstat (limited to 'src/webpage.cpp')
-rw-r--r--src/webpage.cpp52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/webpage.cpp b/src/webpage.cpp
index c3acc1ad..1e25ce8d 100644
--- a/src/webpage.cpp
+++ b/src/webpage.cpp
@@ -564,3 +564,55 @@ void WebPage::showSSLInfo()
);
}
}
+
+
+
+
+void WebPage::updateImage(bool ok)
+{
+ if(!ok)
+ kDebug() << "OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO";
+ else
+ kDebug() << "YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY";
+
+/* int previewIndex = 1;
+ KUrl url;
+ QString snapTitle = QString("ciao");*/
+// // Update page, but only if open
+// if(m_root.document().findAll("#rekonq-newtabpage").count() == 0)
+// return;
+// if(m_root.findAll(".favorites").count() == 0 || m_root.findAll(".closedTabs").count() == 0)
+// return;
+//
+// QStringList urls = ReKonfig::previewUrls();
+//
+// for(int i = 0; i < urls.count(); i++)
+// {
+// QString title = urls.at(i);
+// KUrl url( title );
+//
+//
+// if( WebSnap::existsImage(url) )
+// {
+// QStringList names = ReKonfig::previewNames();
+// names.replace(i, title);
+// ReKonfig::setPreviewNames(names);
+// ReKonfig::self()->writeConfig();
+//
+// QWebElement prev = m_root.findFirst("#preview" + QVariant(i).toString());
+// if(KUrl(prev.findFirst("a").attribute("href")) == url )
+// {
+// QWebElement newPrev = validPreview(i, url, title);
+//
+// if(m_root.findAll(".closedTabs").count() != 0)
+// hideControls(newPrev);
+//
+// prev.replace(newPrev);
+// }
+// break;
+// }
+// }
+
+ NewTabPage p( mainFrame() );
+ p.snapFinished();
+}