]> cloud.milkyroute.net Git - dolphin.git/commitdiff
[Places Panel] Disallow editing devices
authorKai Uwe Broulik <kde@privat.broulik.de>
Tue, 27 Jun 2017 12:03:31 +0000 (14:03 +0200)
committerKai Uwe Broulik <kde@privat.broulik.de>
Tue, 27 Jun 2017 12:03:31 +0000 (14:03 +0200)
I introduced this bug when I changed the layout of the menu.
While it would be nice if one could edit devices, it is currently not possible
and would require significant re-engineering effort in Solid.

While the "Edit" menu works just fine, changes are not persisted.

Reviewed-By: emmanuelp
Differential Revision: https://phabricator.kde.org/D6294

src/panels/places/placespanel.cpp

index 17367b865238f789d79e883d65a50c29aa122dd2..3c9309435be601e5fda724ea1709b6a50aee5ff7 100644 (file)
@@ -197,7 +197,9 @@ void PlacesPanel::slotItemContextMenuRequested(int index, const QPointF& pos)
         menu.addSeparator();
     }
 
-    editAction = menu.addAction(QIcon::fromTheme("document-properties"), i18nc("@item:inmenu", "Edit..."));
+    if (!isDevice) {
+        editAction = menu.addAction(QIcon::fromTheme("document-properties"), i18nc("@item:inmenu", "Edit..."));
+    }
 
     QAction* removeAction = 0;
     if (!isDevice && !item->isSystemItem()) {