X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/dde6f0a0772eee324e2838ba4a076a83193f163c..3bd97ea34c72164a2c583ec28eafcdfc887455cf:/src/viewproperties.cpp diff --git a/src/viewproperties.cpp b/src/viewproperties.cpp index d099b3b22..60e91cabf 100644 --- a/src/viewproperties.cpp +++ b/src/viewproperties.cpp @@ -50,9 +50,9 @@ ViewProperties::ViewProperties(const KUrl& url) : return; } - // we try and save it to a file in the directory being viewed - // if the directory is not writable by the user or the directory is not local - // we store the properties information in a local file + // We try and save it to a file in the directory being viewed. + // If the directory is not writable by the user or the directory is not local, + // we store the properties information in a local file. QString rootDir("/"); // TODO: should this be set to the root of the bookmark, if any? if (cleanUrl.isLocalFile()) { QFileInfo info(m_filepath); @@ -97,7 +97,21 @@ DolphinView::Mode ViewProperties::viewMode() const return static_cast(m_node->viewMode()); } -void ViewProperties::setShowHiddenFilesEnabled(bool show) +void ViewProperties::setShowPreview(bool show) +{ + if (m_node->showPreview() != show) { + m_node->setShowPreview(show); + updateTimeStamp(); + } +} + +bool ViewProperties::showPreview() const +{ + return m_node->showPreview(); +} + + +void ViewProperties::setShowHiddenFiles(bool show) { if (m_node->showHiddenFiles() != show) { m_node->setShowHiddenFiles(show); @@ -105,7 +119,7 @@ void ViewProperties::setShowHiddenFilesEnabled(bool show) } } -bool ViewProperties::isShowHiddenFilesEnabled() const +bool ViewProperties::showHiddenFiles() const { return m_node->showHiddenFiles(); }