diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-09-29 12:24:33 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-09-29 12:24:33 +0200 |
commit | aaebb7569a4d800443c83da8a96fc3d6f92e90fc (patch) | |
tree | b18d190d3c2d56717c3ca295305cec01f6839416 /src/homepage.cpp | |
parent | Implemented about protocol to load home page(s) (diff) | |
download | rekonq-aaebb7569a4d800443c83da8a96fc3d6f92e90fc.tar.xz |
Initial fixes
Diffstat (limited to 'src/homepage.cpp')
-rw-r--r-- | src/homepage.cpp | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/src/homepage.cpp b/src/homepage.cpp index dabcaad7..f79a3446 100644 --- a/src/homepage.cpp +++ b/src/homepage.cpp @@ -98,7 +98,7 @@ QString HomePage::speedDial() QStringList names = ReKonfig::previewNames(); QStringList urls = ReKonfig::previewUrls(); - QString speed = "<tr>"; + QString speed = "<table><tr>"; for(int i=0; i<4; ++i) { speed += "<td><div class=\"thumbnail\">"; @@ -120,7 +120,7 @@ QString HomePage::speedDial() speed += "<br /><br />"; speed += "<a href=\"" + urls.at(i) + "\">" + names.at(i) + "</a></div></td>"; } - speed += "</tr>"; + speed += "</tr></table>"; return speed; } @@ -188,7 +188,34 @@ QString HomePage::homePageMenu() QString HomePage::history() { - return QString(""); + QString history = "<h2>" + i18n("History") + "</h2>"; + history += "<ul>"; + HistoryTreeModel *model = Application::historyManager()->historyTreeModel(); + int i = 0; + do + { + QModelIndex index = model->index(i, 0, QModelIndex() ); + if(model->hasChildren(index)) + { + for(int j=0; j< model->rowCount(index) && i<20 ; ++j) + { + QModelIndex son = model->index(j, 0, index ); + + history += "<li>"; + history += QString("<a href=\"") + son.data(HistoryModel::UrlStringRole).toString() + QString("\">"); + history += son.data().toString(); + history += QString("</a>"); + history += "</li>"; + + i++; + } + } + i++; + } + while( i<20 || model->hasIndex( i , 0 , QModelIndex() ) ); + + history += "<ul>"; + return history; } |