diff options
author | Domrachev Alexandr <alexandr.domrachev@gmail.com> | 2009-06-20 14:40:50 +0400 |
---|---|---|
committer | Domrachev Alexandr <alexandr.domrachev@gmail.com> | 2009-06-20 14:40:50 +0400 |
commit | b3c0db45efc83bfba6f02f00b769b2870f9c40ba (patch) | |
tree | 52aa989abe5312c492f5ebb73dba0610751e59e8 /src/historymenu.cpp | |
parent | Application::icon() changed to static (diff) | |
parent | rekonq 0.1.5: UI changes (diff) | |
download | rekonq-b3c0db45efc83bfba6f02f00b769b2870f9c40ba.tar.xz |
Merge branch 'master' of git@gitorious.org:~avaddon/rekonq/avaddon-clone.git
* 'master' of git@gitorious.org:~avaddon/rekonq/avaddon-clone.git: (23 commits)
rekonq 0.1.5: UI changes
Various Fixes
RFC. History Menu Revisited.
History Panel Action fix
Removed unuseful history dialog. We use just history panel, from now on..
Removed recently closed tabs history
No more Action Back Menu
UI changes
New Tab tool button
Fixing webpage headers
Restored Unsupport Content Handler (new 1st implementation)
Fix forward declaration
Cosmetic networkmanager changes
SVN_SILENT made messages (.desktop file)
Forgot to remove unuseful KDE IS VERSION check. Removed now..
bookmark toolbar displaying ALL the bookmarks.
fixuifiles
SVN_SILENT made messages (.desktop file)
SVN_SILENT made messages (.desktop file)
SVN_SILENT made messages (.desktop file, second try)
...
Conflicts:
src/mainview.cpp
src/mainwindow.cpp
Diffstat (limited to 'src/historymenu.cpp')
-rw-r--r-- | src/historymenu.cpp | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/historymenu.cpp b/src/historymenu.cpp index 234236ac..b5edae3f 100644 --- a/src/historymenu.cpp +++ b/src/historymenu.cpp @@ -19,16 +19,22 @@ * ============================================================ */ +// Auto Includes #include "historymenu.h" #include "historymenu.moc" +// Local Includes #include "application.h" -#include "historydialog.h" +#include "mainwindow.h" +// Qt Includes #include <QtGui/QWidget> #include <QtCore/QModelIndex> +// KDE Includes #include <KUrl> +#include <KMessageBox> + HistoryMenu::HistoryMenu(QWidget *parent) : ModelMenu(parent) @@ -69,21 +75,23 @@ void HistoryMenu::postPopulated() if (m_history->history().count() > 0) addSeparator(); - KAction *showAllAction = new KAction(i18n("Show All History"), this); - connect(showAllAction, SIGNAL(triggered()), this, SLOT(showHistoryDialog())); + QAction *showAllAction = Application::instance()->mainWindow()->actionByName("show_history_panel"); 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::showHistoryDialog() +void HistoryMenu::clearHistory() { - HistoryDialog *dialog = new HistoryDialog(this); - connect(dialog, SIGNAL(openUrl(const KUrl&)), this, SIGNAL(openUrl(const KUrl&))); - dialog->show(); + int res = KMessageBox::warningYesNo(this, i18n("Are you sure you want to delete history?"), i18n("History") ); + + if (res == KMessageBox::Yes) + { + m_history->clear(); + } } |