]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinviewcontainer.cpp
Add 'Sort By' and 'View Mode' into Dolphin file context menus
[dolphin.git] / src / dolphinviewcontainer.cpp
index bf8ac8812f611a33039576b34b00078a13062827..7b995955f59398399d8fb2a2f7ce6466b998f3d1 100644 (file)
@@ -108,6 +108,14 @@ DolphinViewContainer::DolphinViewContainer(const QUrl& url, QWidget* parent) :
     m_messageWidget->setCloseButtonVisible(true);
     m_messageWidget->hide();
 
+#ifndef Q_OS_WIN
+    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);
+    }
+#endif
+
     m_view = new DolphinView(url, this);
     connect(m_view, &DolphinView::urlChanged,
             m_urlNavigator, &KUrlNavigator::setLocationUrl);