diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-04-06 12:18:42 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-04-06 12:18:42 +0200 |
commit | 5cf79d36a82003b3cf94492ad57bf74acee95538 (patch) | |
tree | 8c5db56d7b42aefcc86eaac737d1269833956659 /src | |
parent | Merge commit 'refs/merge-requests/113' of git://gitorious.org/rekonq/mainline... (diff) | |
parent | NewTabPage : add buttons in #actions : "Clear Private Data" for history and b... (diff) | |
download | rekonq-5cf79d36a82003b3cf94492ad57bf74acee95538.tar.xz |
Merge commit 'refs/merge-requests/114' of git://gitorious.org/rekonq/mainline into m114
Diffstat (limited to 'src')
-rw-r--r-- | src/data/home.html | 4 | ||||
-rw-r--r-- | src/newtabpage.cpp | 32 |
2 files changed, 34 insertions, 2 deletions
diff --git a/src/data/home.html b/src/data/home.html index 4afbf2ed..97bec22d 100644 --- a/src/data/home.html +++ b/src/data/home.html @@ -62,12 +62,12 @@ border-width: 5px; #navigation { -webkit-border-image: url(%2/bg2.png) 12 12 12 12 stretch stretch; -max-width: 75%; +max-width: 55%; } #actions, #balance { margin-top: 12px; -width: 10%; +width: 20%; } #actions { diff --git a/src/newtabpage.cpp b/src/newtabpage.cpp index 3e21d0fe..e2837f94 100644 --- a/src/newtabpage.cpp +++ b/src/newtabpage.cpp @@ -115,6 +115,17 @@ void NewTabPage::generate(const KUrl &url) return; } } + if(url.fileName() == QString("clear")) + { + Application::instance()->mainWindow()->actionByName("clear_private_data")->trigger(); + generate(QString("about:" + url.directory())); + return; + } + if(url == KUrl("about:bookmarks/edit")) + { + Application::bookmarkProvider()->bookmarkManager()->slotEditBookmarks(); + return; + } QWebPage *page = m_root.webFrame()->page(); page->mainFrame()->setHtml(m_html); @@ -369,6 +380,13 @@ void NewTabPage::historyPage() { m_root.addClass("history"); + QWebElement clearData = markup(".link"); + clearData.findFirst("a").setAttribute("href", "about:history/clear"); + QString iconPath = QString("file:///" + KIconLoader::global()->iconPath("edit-clear", KIconLoader::SizeSmall || KIconLoader::Small)); + clearData.findFirst("img").setAttribute("src" , iconPath ); + clearData.findFirst("span").appendInside(i18n("Clear Private Data")); + m_root.document().findFirst("#actions").appendInside(clearData); + HistoryTreeModel *model = Application::historyManager()->historyTreeModel(); int i = 0; @@ -401,6 +419,13 @@ void NewTabPage::bookmarksPage() { m_root.addClass("bookmarks"); + QWebElement editBookmarks = markup(".link"); + editBookmarks.findFirst("a").setAttribute("href", "about:bookmarks/edit"); + QString iconPath = QString("file:///" + KIconLoader::global()->iconPath("bookmarks-organize", KIconLoader::SizeSmall || KIconLoader::Small)); + editBookmarks.findFirst("img").setAttribute("src" , iconPath); + editBookmarks.findFirst("span").appendInside(i18n("Edit Bookmarks")); + m_root.document().findFirst("#actions").appendInside(editBookmarks); + KBookmarkGroup bookGroup = Application::bookmarkProvider()->rootGroup(); if (bookGroup.isNull()) { @@ -485,6 +510,13 @@ QString NewTabPage::checkTitle(const QString &title) void NewTabPage::downloadsPage() { m_root.addClass("downloads"); + + QWebElement clearData = markup(".link"); + clearData.findFirst("a").setAttribute("href", "about:downloads/clear"); + QString iconPath = QString("file:///" + KIconLoader::global()->iconPath("edit-clear", KIconLoader::SizeSmall || KIconLoader::Small)); + clearData.findFirst("img").setAttribute("src" , iconPath ); + clearData.findFirst("span").appendInside(i18n("Clear Private Data")); + m_root.document().findFirst("#actions").appendInside(clearData); DownloadList list = Application::historyManager()->downloads(); |