diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-09-09 15:16:30 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-09-10 22:15:11 +0200 |
commit | 8d7145aef0e81d239a717118a8aa7c7e0f980639 (patch) | |
tree | dfa68591a0a6c6a892dac21d1253117433c727b8 | |
parent | Restored Home Action (and button in the main toolbar) (diff) | |
download | rekonq-8d7145aef0e81d239a717118a8aa7c7e0f980639.tar.xz |
Added support for bookmark icons. Not yet working..
-rw-r--r-- | src/homepage.cpp | 7 |
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; } |