Skip to content

Configurable Show hidden files and folders last toggle

This adds the configurable toggles for !203 (merged). Based on the phab patch by @harogaston.

This also disables Hidden Files Last sort by default.

2021-08-01___18-01-34

When a folder enables Hidden Files Last:

# ~/.directory
[Dolphin]
SortHiddenLast=true

You can easily enable Hidden Files Last by default (!203 (merged) behavior) by:

  1. View > Adjust View Display Style
  2. Check: Sort hidden files last
  3. Check: Use as default view settings
  • Changed !203 (merged) behavior from true to false by default.
  • Commit is authored as @harogaston since most of the work was done by him.
  • emit => Q_EMIT
  • Fixed checkbox in View Properties Dialog
    diff --git a/src/settings/viewpropertiesdialog.cpp b/src/settings/viewpropertiesdialog.cpp
    index fb45de9e2..67f44cb89 100644
    --- a/src/settings/viewpropertiesdialog.cpp
    +++ b/src/settings/viewpropertiesdialog.cpp
    @@ -145,6 +145,7 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) :
         layout->addItem(new QSpacerItem(0, Dolphin::VERTICAL_SPACER_HEIGHT, QSizePolicy::Fixed, QSizePolicy::Fixed));
     
         layout->addRow(i18n("View options:"), m_sortFoldersFirst);
    +    layout->addRow(QString(), m_sortHiddenLast);
         layout->addRow(QString(), m_previewsShown);
         layout->addRow(QString(), m_showInGroups);
         layout->addRow(QString(), m_showHiddenFiles);
    @@ -430,6 +431,7 @@ void ViewPropertiesDialog::loadSettings()
         m_sorting->setCurrentIndex(sortRoleIndex);
     
         m_sortFoldersFirst->setChecked(m_viewProps->sortFoldersFirst());
    +    m_sortHiddenLast->setChecked(m_viewProps->sortHiddenLast());
     
         // Load show preview, show in groups and show hidden files settings
         m_previewsShown->setChecked(m_viewProps->previewsShown());

CCBUG: 241227

Revision: https://phabricator.kde.org/D29115

Edited by Chris Holland

Merge request reports

Loading