┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphincontextmenu.h
diff options
context:
space:
mode:
authorMark Gaiser <[email protected]>2010-09-17 19:47:01 +0000
committerMark Gaiser <[email protected]>2010-09-17 19:47:01 +0000
commit304e9524b6c1f3e1582a07c34cdf42ea1c3167bb (patch)
treee3cb389b64076bba01d1e32b950fcaa24aeb2de2 /src/dolphincontextmenu.h
parent02c02a05c16366126db177f981991880f2375278 (diff)
When you view the context menu of a file/folder and shift is pressed (and the delete action line is not enabled in the settings) then the
"Move to trash (del)" action gets replaced by the "Delete (shift del)" action and replaced back to "Move to trash (del)" when you release shift. BUG: 194275 svn path=/trunk/KDE/kdebase/apps/; revision=1176493
Diffstat (limited to 'src/dolphincontextmenu.h')
-rw-r--r--src/dolphincontextmenu.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/dolphincontextmenu.h b/src/dolphincontextmenu.h
index ae0d1c336..052149ba3 100644
--- a/src/dolphincontextmenu.h
+++ b/src/dolphincontextmenu.h
@@ -25,11 +25,14 @@
#include <kservice.h>
#include <kurl.h>
#include <konq_copytomenu.h>
+#include <kmodifierkeyinfo.h>
#include <QtCore/QObject>
#include <QtCore/QVector>
+#include <QScopedPointer>
+
class KMenu;
class KFileItem;
class QAction;
@@ -70,23 +73,27 @@ public:
virtual ~DolphinContextMenu();
void setCustomActions(const QList<QAction*>& actions);
+ void setShiftIsPressed(bool pressed);
/** Opens the context menu model. */
void open();
+public slots:
+ void deleteOrTrashMenuEntry(Qt::Key key, bool pressed);
+
private:
void openTrashContextMenu();
void openTrashItemContextMenu();
void openItemContextMenu();
void openViewportContextMenu();
- void insertDefaultItemActions(KMenu* popup);
+ void insertDefaultItemActions();
/**
* Adds the "Show menubar" action to the menu if the
* menubar is hidden.
*/
- void addShowMenubarAction(KMenu* menu);
+ void addShowMenubarAction();
/**
* Returns a name for adding the URL \a url to the Places panel.
@@ -99,9 +106,9 @@ private:
private:
KFileItemListProperties& capabilities();
- void addServiceActions(KMenu* menu, KFileItemActions& fileItemActions);
- void addVersionControlActions(KMenu* menu);
- void addCustomActions(KMenu* menu);
+ void addServiceActions(KFileItemActions& fileItemActions);
+ void addVersionControlActions();
+ void addCustomActions();
private:
struct Entry
@@ -130,6 +137,9 @@ private:
int m_context;
KonqCopyToMenu m_copyToMenu;
QList<QAction*> m_customActions;
+ QScopedPointer<KMenu> m_popup;
+ bool m_showDeleteCommand;
+ bool m_shiftIsPressed;
};
#endif