[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/network/rekonq/src
From: Andrea Diamantini <adjam7 () gmail ! com>
Date: 2009-06-21 20:31:22
Message-ID: 1245616282.035749.17061.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 984990 by adjam:
RFC. History Menu Revisited.
M +13 -1 historymenu.cpp
M +1 -0 historymenu.h
M +3 -3 modelmenu.cpp
--- trunk/playground/network/rekonq/src/historymenu.cpp #984989:984990
@@ -33,6 +33,7 @@
// KDE Includes
#include <KUrl>
+#include <KMessageBox>
HistoryMenu::HistoryMenu(QWidget *parent)
@@ -78,11 +79,22 @@
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;
--- trunk/playground/network/rekonq/src/historymenu.h #984989:984990
@@ -58,6 +58,7 @@
private slots:
void activated(const QModelIndex &index);
+ void clearHistory();
private:
HistoryManager *m_history;
--- trunk/playground/network/rekonq/src/modelmenu.cpp #984989:984990
@@ -171,18 +171,18 @@
for (int i = 0; i < end; ++i)
{
QModelIndex idx = m_model->index(i, 0, parent);
- if (m_model->hasChildren(idx))
+/* if (m_model->hasChildren(idx))
{
createMenu(idx, -1, menu);
}
else
- {
+ {*/
if (m_separatorRole != 0
&& idx.data(m_separatorRole).toBool())
addSeparator();
else
menu->addAction(makeAction(idx));
- }
+// }
if (menu == this && i == m_firstSeparator - 1)
addSeparator();
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic