summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-09-09 15:16:30 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-09-10 22:15:11 +0200
commit8d7145aef0e81d239a717118a8aa7c7e0f980639 (patch)
treedfa68591a0a6c6a892dac21d1253117433c727b8 /src
parentRestored Home Action (and button in the main toolbar) (diff)
downloadrekonq-8d7145aef0e81d239a717118a8aa7c7e0f980639.tar.xz
Added support for bookmark icons. Not yet working..
Diffstat (limited to 'src')
-rw-r--r--src/homepage.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/homepage.cpp b/src/homepage.cpp
index f733d4c8..6acd4afd 100644
--- a/src/homepage.cpp
+++ b/src/homepage.cpp
@@ -35,6 +35,7 @@
// KDE Includes
#include <KStandardDirs>
+#include <KIconLoader>
#include <KDebug>
// Qt Includes
@@ -94,6 +95,7 @@ QString HomePage::fillHistory()
for(int j=0; j< model->rowCount(index); ++j)
{
QModelIndex son = model->index(j, 0, index );
+// FIXME add an icon to each history item history += "<img src=\"" + ciao + "\" alt=\"icon\" />";
history += QString("<a href=\"") + son.data(HistoryModel::UrlStringRole).toString() + QString("\">") +
son.data().toString() + QString("</a><br />");
}
@@ -169,5 +171,8 @@ QString HomePage::createBookItem(const KBookmark &bookmark)
{
return QString("<hr />");
}
- return "<a href=\"" + bookmark.url().prettyUrl() + "\">" + bookmark.text() + "</a><br />";
+
+ QString str = ""; // FIXME Add icon "<img src=\"" + KStandardDirs::findResource( "icon", bookmark.icon() + ".png" ) + "\" alt=\"icon\" />";
+ str += "<a href=\"" + bookmark.url().prettyUrl() + "\">" + bookmark.text() + "</a><br />";
+ return str;
}