Summary:
Use Ctrl+H as another keyboard shortcut to show and hide hidden files, as it is already the standard used in other GTK-based Linux file managers (Nautilus, Nemo, Caja, Thunar, Pantheon Files). This doesn't replace any existing shortcuts, so existing KDE users' muscle memory is retained.
FEATURE: 390527
FIXED-IN: KDE Applications 17.12.3
Test Plan:
- Ctrl+H now shows and hides hidden files
- Alt+. still works to do the same
- F8 still works to do the same
- Toolbar button still changes state appropriately when any of the three shortcuts are used
Reviewers: #dolphin, elvisangelaccio
Reviewed By: elvisangelaccio
Subscribers: emateli, elvisangelaccio
Differential Revision: https://phabricator.kde.org/D10558
KToggleAction* showHiddenFiles = m_actionCollection->add<KToggleAction>(QStringLiteral("show_hidden_files"));
showHiddenFiles->setText(i18nc("@action:inmenu View", "Hidden Files"));
showHiddenFiles->setToolTip(i18nc("@info", "Visibility of hidden files and folders"));
KToggleAction* showHiddenFiles = m_actionCollection->add<KToggleAction>(QStringLiteral("show_hidden_files"));
showHiddenFiles->setText(i18nc("@action:inmenu View", "Hidden Files"));
showHiddenFiles->setToolTip(i18nc("@info", "Visibility of hidden files and folders"));
- m_actionCollection->setDefaultShortcuts(showHiddenFiles, {Qt::ALT + Qt::Key_Period, Qt::Key_F8});
+ m_actionCollection->setDefaultShortcuts(showHiddenFiles, {Qt::ALT + Qt::Key_Period, Qt::CTRL + Qt::Key_H, Qt::Key_F8});
connect(showHiddenFiles, &KToggleAction::triggered, this, &DolphinViewActionHandler::toggleShowHiddenFiles);
QAction* adjustViewProps = m_actionCollection->addAction(QStringLiteral("view_properties"));
connect(showHiddenFiles, &KToggleAction::triggered, this, &DolphinViewActionHandler::toggleShowHiddenFiles);
QAction* adjustViewProps = m_actionCollection->addAction(QStringLiteral("view_properties"));