]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/viewproperties.cpp
fixed issue that the video preview size was wrong during resizing the information...
[dolphin.git] / src / viewproperties.cpp
index 62898e67004d43bb25a24db5a2194885244d5e7a..3fc102d6c933c0d3c7d40ed45f8664e812080aa8 100644 (file)
@@ -56,9 +56,9 @@ ViewProperties::ViewProperties(const KUrl& url) :
 
     KUrl cleanUrl(url);
     cleanUrl.cleanPath();
-    m_filepath = cleanUrl.path();
+    m_filepath = cleanUrl.toLocalFile();
 
-    if ((m_filepath.length() < 1) || (m_filepath.at(0) != QChar('/'))) {
+    if ((m_filepath.length() < 1) || (!QDir::isAbsolutePath(m_filepath))) {
         const QString file = destinationDir("global") + FILE_NAME;
         m_node = new ViewPropertySettings(KSharedConfig::openConfig(file));
         return;
@@ -198,6 +198,19 @@ Qt::SortOrder ViewProperties::sortOrder() const
     return static_cast<Qt::SortOrder>(m_node->sortOrder());
 }
 
+void ViewProperties::setSortFoldersFirst(bool foldersFirst)
+{
+    if (m_node->sortFoldersFirst() != foldersFirst) {
+        m_node->setSortFoldersFirst(foldersFirst);
+        updateTimeStamp();
+    }
+}
+
+bool ViewProperties::sortFoldersFirst() const
+{
+    return m_node->sortFoldersFirst();
+}
+
 void ViewProperties::setAdditionalInfo(KFileItemDelegate::InformationList list)
 {
     int info = NoInfo;