summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/newtabpage.cpp32
1 files changed, 19 insertions, 13 deletions
diff --git a/src/newtabpage.cpp b/src/newtabpage.cpp
index f797e497..271ad4bb 100644
--- a/src/newtabpage.cpp
+++ b/src/newtabpage.cpp
@@ -110,10 +110,16 @@ void NewTabPage::generate(const KUrl &url)
return;
}
}
- if (url.fileName() == QL1S("clear"))
+ if (url == KUrl("about:downloads/clear"))
{
- rApp->mainWindow()->actionByName("clear_private_data")->trigger();
- generate(QString(QL1S("about:") + url.directory()));
+ rApp->downloadManager()->clearDownloadsHistory();
+ generate(KUrl("about:downloads"));
+ return;
+ }
+ if (url == KUrl("about:history/clear"))
+ {
+ rApp->historyManager()->clear();
+ generate(KUrl("about:history"));
return;
}
if (url == KUrl("about:bookmarks/edit"))
@@ -394,11 +400,11 @@ void NewTabPage::historyPage()
{
m_root.addClass(QL1S("history"));
- const QWebElement clearData = createLinkItem(i18n("Clear Private Data"),
- QL1S("about:history/clear"),
- QL1S("edit-clear"),
- KIconLoader::Toolbar);
- m_root.document().findFirst(QL1S("#actions")).appendInside(clearData);
+ const QWebElement clearHistory = createLinkItem(i18n("Clear History"),
+ QL1S("about:history/clear"),
+ QL1S("edit-clear"),
+ KIconLoader::Toolbar);
+ m_root.document().findFirst(QL1S("#actions")).appendInside(clearHistory);
HistoryTreeModel *model = rApp->historyManager()->historyTreeModel();
@@ -563,11 +569,11 @@ void NewTabPage::downloadsPage()
{
m_root.addClass(QL1S("downloads"));
- const QWebElement clearData = createLinkItem(i18n("Clear Private Data"),
- QL1S("about:downloads/clear"),
- QL1S("edit-clear"),
- KIconLoader::Toolbar);
- m_root.document().findFirst(QL1S("#actions")).appendInside(clearData);
+ const QWebElement clearDownloads = createLinkItem(i18n("Clear Downloads"),
+ QL1S("about:downloads/clear"),
+ QL1S("edit-clear"),
+ KIconLoader::Toolbar);
+ m_root.document().findFirst(QL1S("#actions")).appendInside(clearDownloads);
DownloadList list = rApp->downloadManager()->downloads();