]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/views/dolphinview.cpp
Replaced all KNewFileMenu usages in DolphinPart by DolphinNewFileMenu.
[dolphin.git] / src / views / dolphinview.cpp
index fa43656c1483a1d2553a4fbc8a36a7c414bab2c1..c1d245301c7f09764e386a21643ccc6ad95f09a2 100644 (file)
@@ -556,8 +556,8 @@ QString DolphinView::statusBarText() const
         }
 
         if (folderCount + fileCount == 1) {
-            // If only one item is selected, show the filename
-            filesText = i18nc("@info:status", "<filename>%1</filename> selected", list.first().text());
+            // If only one item is selected, show info about it
+            return list.first().getStatusBarInfo();
         } else {
             // At least 2 items are selected
             foldersText = i18ncp("@info:status", "1 Folder selected", "%1 Folders selected", folderCount);
@@ -1054,7 +1054,7 @@ void DolphinView::slotItemDropEvent(int index, QGraphicsSceneDragDropEvent* even
     if (op && destUrl == url()) {
         // Mark the dropped urls as selected.
         m_clearSelectionBeforeSelectingNewItems = true;
-        connect(op, SIGNAL(urlPasted(KUrl)), this, SLOT(slotUrlPasted(KUrl)));
+        connect(op, SIGNAL(aboutToCreate(KUrl::List)), this, SLOT(slotAboutToCreate(KUrl::List)));
     }
 
     setActive(true);
@@ -1099,7 +1099,7 @@ void DolphinView::slotAboutToCreate(const KUrl::List& urls)
             markUrlAsCurrent(urls.first());
             m_markFirstNewlySelectedItemAsCurrent = false;
         }
-        m_selectedUrls << urls;
+        m_selectedUrls << KDirModel::simplifiedUrlList(urls);
     }
 }
 
@@ -1254,10 +1254,13 @@ KUrl DolphinView::openItemAsFolderUrl(const KFileItem& item, const bool browseTh
         }
 
         if (mimetype == QLatin1String("application/x-desktop")) {
-            // Redirect to the URL in Type=Link desktop files
+            // Redirect to the URL in Type=Link desktop files, unless it is a http(s) URL.
             KDesktopFile desktopFile(url.toLocalFile());
             if (desktopFile.hasLinkType()) {
-                return desktopFile.readUrl();
+                const QString linkUrl = desktopFile.readUrl();
+                if (!linkUrl.startsWith(QLatin1String("http"))) {
+                    return linkUrl;
+                }
             }
         }
     }
@@ -1663,7 +1666,7 @@ QMimeData* DolphinView::selectionMimeData() const
 void DolphinView::updateWritableState()
 {
     const bool wasFolderWritable = m_isFolderWritable;
-    m_isFolderWritable = true;
+    m_isFolderWritable = false;
 
     const KFileItem item = m_model->rootItem();
     if (!item.isNull()) {