m_messageWidget->setPosition(KMessageWidget::Header);
m_messageWidget->hide();
-#ifndef Q_OS_WIN
+#if !defined(Q_OS_WIN) && !defined(Q_OS_HAIKU)
if (getuid() == 0) {
// We must be logged in as the root user; show a big scary warning
showMessage(i18n("Running Dolphin as root can be dangerous. Please be careful."), Warning);
connect(m_view, &DolphinView::urlChanged, urlNavigator, &DolphinUrlNavigator::setLocationUrl);
connect(urlNavigator, &DolphinUrlNavigator::activated, this, &DolphinViewContainer::activate);
+ urlNavigator->setReadOnlyBadgeVisible(rootItem().isLocalFile() && !rootItem().isWritable());
+
m_urlNavigatorConnected = urlNavigator;
}
m_statusBar->setProgressText(QString());
updateDirectoryLoadingProgress(-1);
}
+
+ if (m_urlNavigatorConnected) {
+ m_urlNavigatorConnected->setReadOnlyBadgeVisible(false);
+ }
}
void DolphinViewContainer::slotDirectoryLoadingCompleted()
} else {
updateStatusBar();
}
+
+ if (m_urlNavigatorConnected) {
+ m_urlNavigatorConnected->setReadOnlyBadgeVisible(rootItem().isLocalFile() && !rootItem().isWritable());
+ }
}
void DolphinViewContainer::slotDirectoryLoadingCanceled()
void DolphinViewContainer::slotUrlSelectionRequested(const QUrl &url)
{
- m_view->markUrlsAsSelected({url});
+ // We do not want to select any item here because there is no reason to assume that the user wants to edit the folder we are emerging from. BUG: 424723
+
m_view->markUrlAsCurrent(url); // makes the item scroll into view
}