summaryrefslogtreecommitdiff
path: root/src/historymenu.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-06-20 10:36:31 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-06-20 10:36:31 +0200
commit33ac88b25eeb188617da4e445e34eddefbfa8b86 (patch)
tree1a5470397aa0117256126a7140c825a11241bde3 /src/historymenu.cpp
parentHistory Panel Action fix (diff)
downloadrekonq-33ac88b25eeb188617da4e445e34eddefbfa8b86.tar.xz
RFC. History Menu Revisited.
Diffstat (limited to 'src/historymenu.cpp')
-rw-r--r--src/historymenu.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/historymenu.cpp b/src/historymenu.cpp
index 8d75324d..b5edae3f 100644
--- a/src/historymenu.cpp
+++ b/src/historymenu.cpp
@@ -33,6 +33,7 @@
// KDE Includes
#include <KUrl>
+#include <KMessageBox>
HistoryMenu::HistoryMenu(QWidget *parent)
@@ -78,11 +79,22 @@ void HistoryMenu::postPopulated()
addAction(showAllAction);
KAction *clearAction = new KAction(i18n("Clear History"), this);
- connect(clearAction, SIGNAL(triggered()), m_history, SLOT(clear()));
+ connect(clearAction, SIGNAL(triggered()), this, SLOT(clearHistory()));
addAction(clearAction);
}
+void HistoryMenu::clearHistory()
+{
+ int res = KMessageBox::warningYesNo(this, i18n("Are you sure you want to delete history?"), i18n("History") );
+
+ if (res == KMessageBox::Yes)
+ {
+ m_history->clear();
+ }
+}
+
+
void HistoryMenu::setInitialActions(QList<QAction*> actions)
{
m_initialActions = actions;