diff options
-rw-r--r-- | data/home.html | 2 | ||||
-rw-r--r-- | src/homepage.cpp | 33 | ||||
-rw-r--r-- | src/rekonq.kcfg | 4 |
3 files changed, 33 insertions, 6 deletions
diff --git a/data/home.html b/data/home.html index 1daa34fb..e1cd8905 100644 --- a/data/home.html +++ b/data/home.html @@ -107,7 +107,7 @@ text-decoration:none; <div id="container"> <div id="header"><h1>rekonq</h1></div> <div id="navigation">%2</div> -<table>%3</table> +%3 </div> </body> 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; } diff --git a/src/rekonq.kcfg b/src/rekonq.kcfg index 354e3719..a3b0a1f6 100644 --- a/src/rekonq.kcfg +++ b/src/rekonq.kcfg @@ -12,10 +12,10 @@ <!-- New Tab Page Settings --> <group name="NewTabPage"> <entry name="previewNames" type="StringList"> - <default>KDE site,Google,rekonq</default> + <default>KDE site,KDE site,KDE site,KDE site,KDE site,KDE site,Google,rekonq</default> </entry> <entry name="previewUrls" type="StringList"> - <default>http://www.kde.org,http://www.google.com,http://rekonq.sourceforge.net</default> + <default>http://www.kde.org,http://www.kde.org,http://www.kde.org,http://www.kde.org,http://www.kde.org,http://www.kde.org,http://www.google.com,http://rekonq.sourceforge.net</default> </entry> <entry name="showLastVisitedSites" type="Bool"> <default>true</default> |