]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Merge remote-tracking branch 'origin/KDE/4.12'
authorFrank Reininghaus <frank78ac@googlemail.com>
Fri, 7 Feb 2014 09:26:00 +0000 (10:26 +0100)
committerFrank Reininghaus <frank78ac@googlemail.com>
Fri, 7 Feb 2014 09:26:00 +0000 (10:26 +0100)
src/dolphinmainwindow.cpp
src/views/dolphinview.cpp

index a4dbb6f341c02404baf3dc5d41e037689cae8446..847301434b7439ddf7d6befb614cd2eda8bb7c08 100644 (file)
@@ -677,6 +677,13 @@ void DolphinMainWindow::readProperties(const KConfigGroup& group)
                 Q_ASSERT(cont);
             }
 
+            // The right view must be activated before the URL is set. Changing
+            // the URL in the right view will emit the right URL navigator's
+            // urlChanged(KUrl) signal, which is connected to the changeUrl(KUrl)
+            // slot. That slot will change the URL in the left view if it is still
+            // active. See https://bugs.kde.org/show_bug.cgi?id=330047.
+            setActiveViewContainer(cont);
+
             cont->setUrl(secondaryUrl);
             const bool editable = group.readEntry(tabProperty("Secondary Editable", i), false);
             cont->urlNavigator()->setUrlEditable(editable);
index 63b53f2e263b68324e0de4c73370bb5b682c8c59..9f5f48a86b9521ccf2e6a1de43bcd3403c8c4308 100644 (file)
@@ -1662,11 +1662,16 @@ void DolphinView::updateWritableState()
     const bool wasFolderWritable = m_isFolderWritable;
     m_isFolderWritable = false;
 
-    const KFileItem item = m_model->rootItem();
-    if (!item.isNull()) {
-        KFileItemListProperties capabilities(KFileItemList() << item);
-        m_isFolderWritable = capabilities.supportsWriting();
+    KFileItem item = m_model->rootItem();
+    if (item.isNull()) {
+        // Try to find out if the URL is writable even if the "root item" is
+        // null, see https://bugs.kde.org/show_bug.cgi?id=330001
+        item = KFileItem(KFileItem::Unknown, KFileItem::Unknown, url(), true);
     }
+
+    KFileItemListProperties capabilities(KFileItemList() << item);
+    m_isFolderWritable = capabilities.supportsWriting();
+
     if (m_isFolderWritable != wasFolderWritable) {
         emit writeStateChanged(m_isFolderWritable);
     }