]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphincontextmenu.cpp
When there is no grid, we need to recalculate correctly the vertical scrollbar size
[dolphin.git] / src / dolphincontextmenu.cpp
index a7a5ae567cc6d28d454396b1ac7e4cf80d5f0b7a..d7953df4fd4c13e8b08aa64ef29297d3ccbf489c 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();
 
@@ -262,7 +261,7 @@ void DolphinContextMenu::openViewportContextMenu()
     QAction* action = popup->exec(QCursor::pos());
     if (action == propertiesAction) {
         const KUrl& url = m_mainWindow->activeViewContainer()->url();
-        KPropertiesDialog dialog(url);
+        KPropertiesDialog dialog(url, m_mainWindow);
         dialog.exec();
     } else if (action == addToPlacesAction) {
         const KUrl& url = m_mainWindow->activeViewContainer()->url();