mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-12 12:54:29 +00:00
Merge remote-tracking branch 'origin/KDE/4.12'
This commit is contained in:
commit
016cf47c53
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue