diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-06-20 10:36:31 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-06-20 10:36:31 +0200 |
commit | 33ac88b25eeb188617da4e445e34eddefbfa8b86 (patch) | |
tree | 1a5470397aa0117256126a7140c825a11241bde3 /src/historymenu.cpp | |
parent | History Panel Action fix (diff) | |
download | rekonq-33ac88b25eeb188617da4e445e34eddefbfa8b86.tar.xz |
RFC. History Menu Revisited.
Diffstat (limited to 'src/historymenu.cpp')
-rw-r--r-- | src/historymenu.cpp | 14 |
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; |