]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/treeviewcontextmenu.cpp
Forwardport 773570:
[dolphin.git] / src / treeviewcontextmenu.cpp
index 834456e02c09e0dbe7c4bbc081565882821a30f7..40c5e9cd8f4fd8844685e3de72898314751650c0 100644 (file)
@@ -75,12 +75,11 @@ void TreeViewContextMenu::open()
     popup->addAction(renameAction);
 
     // insert 'Move to Trash' and (optionally) 'Delete'
-    const KSharedConfig::Ptr globalConfig = KSharedConfig::openConfig("kdeglobals", KConfig::NoGlobals);
-    const KConfigGroup kdeConfig(globalConfig, "KDE");
+    KConfigGroup kdeConfig(KGlobal::config(), "KDE");
     bool showDeleteCommand = kdeConfig.readEntry("ShowDeleteCommand", false);
     const KUrl& url = m_fileInfo.url();
     if (url.isLocalFile()) {
-        QAction* moveToTrashAction = new QAction(KIcon("edit-trash"),
+        QAction* moveToTrashAction = new QAction(KIcon("user-trash"),
                                                  i18nc("@action:inmenu", "Move To Trash"), this);
         connect(moveToTrashAction, SIGNAL(triggered()), this, SLOT(moveToTrash()));
         popup->addAction(moveToTrashAction);
@@ -140,9 +139,9 @@ void TreeViewContextMenu::paste()
 
 void TreeViewContextMenu::rename()
 {
-    QList<KFileItem> item;
+    KFileItemList item;
     item.append(m_fileInfo);
-    RenameDialog dialog(item);
+    RenameDialog dialog(m_parent, item);
     if (dialog.exec() == QDialog::Accepted) {
         const QString& newName = dialog.newName();
         if (!newName.isEmpty()) {
@@ -165,7 +164,7 @@ void TreeViewContextMenu::deleteItem()
 
 void TreeViewContextMenu::showProperties()
 {
-    KPropertiesDialog dialog(m_fileInfo.url());
+    KPropertiesDialog dialog(m_fileInfo.url(), m_parent);
     dialog.exec();
 }