#include "viewproperties.h"
-#include "rolesaccessor.h"
#include "dolphin_directoryviewpropertysettings.h"
#include "dolphin_generalsettings.h"
m_filePath = url.toLocalFile();
const QFileInfo info(m_filePath);
if (!info.isWritable() || !isPartOfHome(m_filePath)) {
+#ifdef Q_OS_WIN
+ // m_filePath probably begins with C:/ - the colon is not a valid character for paths though
+ m_filePath = QDir::separator() + m_filePath.remove(QLatin1Char(':'));
+#endif
m_filePath = destinationDir("local") + m_filePath;
}
} else {
return roles;
}
+void ViewProperties::setHeaderColumnWidths(const QList<int>& widths)
+{
+ if (m_node->headerColumnWidths() != widths) {
+ m_node->setHeaderColumnWidths(widths);
+ update();
+ }
+}
+
+QList<int> ViewProperties::headerColumnWidths() const
+{
+ return m_node->headerColumnWidths();
+}
+
void ViewProperties::setDirProperties(const ViewProperties& props)
{
setViewMode(props.viewMode());
setSortOrder(props.sortOrder());
setSortFoldersFirst(props.sortFoldersFirst());
setVisibleRoles(props.visibleRoles());
+ setHeaderColumnWidths(props.headerColumnWidths());
}
void ViewProperties::setAutoSaveEnabled(bool autoSave)