]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphincontextmenu.cpp
This fixes the selection problem with the mouse _only_ for the categorized view....
[dolphin.git] / src / dolphincontextmenu.cpp
index a7a5ae567cc6d28d454396b1ac7e4cf80d5f0b7a..648928e0f29dffd08d7f9a49399b05cf29da8d98 100644 (file)
@@ -75,7 +75,7 @@ void DolphinContextMenu::open()
         m_context |= TrashContext;
     }
 
-    if (!m_fileInfo.isNull()) {
+    if (!m_fileInfo.isNull() && (m_selectedItems.count() > 0)) {
         m_context |= ItemContext;
         // TODO: handle other use cases like devices + desktop files
     }
@@ -109,7 +109,7 @@ void DolphinContextMenu::openTrashContextMenu()
     emptyTrashAction->setEnabled(!trashConfig.group("Status").readEntry("Empty", true));
     popup->addAction(emptyTrashAction);
 
-    QAction* addToPlacesAction = popup->addAction(KIcon("folder-bookmarks"),
+    QAction* addToPlacesAction = popup->addAction(KIcon("bookmark-new"),
                                                   i18nc("@action:inmenu Add current folder to places", "Add to Places"));
 
     QAction* propertiesAction = m_mainWindow->actionCollection()->action("properties");
@@ -175,7 +175,7 @@ void DolphinContextMenu::openItemContextMenu()
     // insert 'Bookmark This Folder' entry if exactly one item is selected
     QAction* addToPlacesAction = 0;
     if (m_fileInfo.isDir() && (m_selectedUrls.count() == 1)) {
-        addToPlacesAction = popup->addAction(KIcon("folder-bookmarks"),
+        addToPlacesAction = popup->addAction(KIcon("bookmark-new"),
                                              i18nc("@action:inmenu Add selected folder to places", "Add to Places"));
     }
 
@@ -219,7 +219,6 @@ void DolphinContextMenu::openItemContextMenu()
 
 void DolphinContextMenu::openViewportContextMenu()
 {
-    Q_ASSERT(m_fileInfo.isNull());
     KMenu* popup = new KMenu(m_mainWindow);
 
     addShowMenubarAction(popup);
@@ -253,7 +252,7 @@ void DolphinContextMenu::openViewportContextMenu()
 
     popup->addSeparator();
 
-    QAction* addToPlacesAction = popup->addAction(KIcon("folder-bookmarks"),
+    QAction* addToPlacesAction = popup->addAction(KIcon("bookmark-new"),
                                                   i18nc("@action:inmenu Add current folder to places", "Add to Places"));
     popup->addSeparator();