┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2007-03-17 20:49:17 +0000
committerPeter Penz <[email protected]>2007-03-17 20:49:17 +0000
commitacfccceb916b885aa2764759076bad1b9d121eb2 (patch)
tree68e5550e3dae9c763fef4d90be8467ec0fbada4e
parent6baba131b2e112c37015412b701bc3ea01a86c04 (diff)
respect context for 'Move To Trash' and 'Delete' action
svn path=/trunk/KDE/kdebase/apps/; revision=643575
-rw-r--r--src/dolphincontextmenu.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/dolphincontextmenu.cpp b/src/dolphincontextmenu.cpp
index 6ff20fe7f..a18f88a41 100644
--- a/src/dolphincontextmenu.cpp
+++ b/src/dolphincontextmenu.cpp
@@ -366,7 +366,8 @@ void DolphinContextMenu::insertDefaultItemActions(KMenu* popup)
const KSharedConfig::Ptr globalConfig = KSharedConfig::openConfig("kdeglobals", KConfig::NoGlobals);
const KConfigGroup kdeConfig(globalConfig, "KDE");
bool showDeleteCommand = kdeConfig.readEntry("ShowDeleteCommand", false);
- const KUrl& url = m_mainWindow->activeView()->url();
+ const KUrl& url = insertSidebarActions ? m_fileInfo->url():
+ m_mainWindow->activeView()->url();
if (url.isLocalFile()) {
QAction* moveToTrashAction = 0;
if (insertSidebarActions) {
@@ -374,7 +375,7 @@ void DolphinContextMenu::insertDefaultItemActions(KMenu* popup)
connect(moveToTrashAction, SIGNAL(triggered()), this, SLOT(moveToTrash()));
}
else {
- collection->action("move_to_trash");
+ moveToTrashAction = collection->action("move_to_trash");
}
popup->addAction(moveToTrashAction);
}
@@ -389,7 +390,7 @@ void DolphinContextMenu::insertDefaultItemActions(KMenu* popup)
connect(deleteAction, SIGNAL(triggered()), this, SLOT(deleteItem()));
}
else {
- collection->action("delete");
+ deleteAction = collection->action("delete");
}
popup->addAction(deleteAction);
}