- showHiddenFiles->setShortcuts(QList<QKeySequence>() << Qt::ALT + Qt::Key_Period << Qt::Key_F8);
- connect(showHiddenFiles, SIGNAL(triggered(bool)), this, SLOT(toggleShowHiddenFiles(bool)));
-
- KAction* adjustViewProps = m_actionCollection->addAction("view_properties");
- adjustViewProps->setText(i18nc("@action:inmenu View", "Adjust View Properties..."));
- connect(adjustViewProps, SIGNAL(triggered()), this, SLOT(slotAdjustViewProperties()));
+ showHiddenFiles->setWhatsThis(xi18nc("@info:whatsthis",
+ "<para>When "
+ "this is enabled, <emphasis>hidden</emphasis> files and folders "
+ "are visible. They will be displayed semi-transparent.</para>"
+ "<para>Hidden items only differ from normal ones in that their "
+ "name starts with a dot (\".\"). Typically, there is no need for "
+ "users to access them, which is why they are hidden.</para>"
+ "<para>Items can also be hidden if their names are listed in a text file "
+ "named \".hidden\". Files with the \"application/x-trash\" MIME type, "
+ "such as backup files, can also be hidden by enabling that setting in "
+ "Configure Dolphin > View > General.</para>"));
+ m_actionCollection->setDefaultShortcuts(showHiddenFiles, KStandardShortcut::showHideHiddenFiles());
+ connect(showHiddenFiles, &KToggleAction::triggered, this, &DolphinViewActionHandler::toggleShowHiddenFiles);
+
+ QAction *adjustViewProps = m_actionCollection->addAction(QStringLiteral("view_properties"));
+ adjustViewProps->setText(i18nc("@action:inmenu View", "Adjust View Display Style…"));
+ adjustViewProps->setIcon(QIcon::fromTheme(QStringLiteral("view-choose")));
+ adjustViewProps->setWhatsThis(i18nc("@info:whatsthis",
+ "This opens a window "
+ "in which all folder view properties can be adjusted."));
+ connect(adjustViewProps, &QAction::triggered, this, &DolphinViewActionHandler::slotAdjustViewProperties);
+
+ // View settings: the dropdown menu contains various view-related actions
+ KActionMenu *viewSettings = m_actionCollection->add<KActionMenu>(QStringLiteral("view_settings"));
+ viewSettings->setText(i18nc("@action:intoolbar", "View Settings"));
+ viewSettings->setWhatsThis(
+ xi18nc("@info:whatsthis View Settings Toolbutton", "This cycles through all view modes. The dropdown menu contains various view-related actions."));
+ const auto actions = viewModeActions->actions();
+ for (QAction *action : actions) {
+ viewSettings->addAction(action);
+ }
+ viewSettings->addSeparator();
+ viewSettings->addAction(zoomWidgetAction);
+ viewSettings->addAction(sortByActionMenu);
+ viewSettings->addAction(visibleRolesMenu);
+ viewSettings->addAction(showPreview);
+ viewSettings->addAction(showInGroups);
+ viewSettings->addAction(showHiddenFiles);
+ viewSettings->addAction(adjustViewProps);
+ viewSettings->setPopupMode(QToolButton::ToolButtonPopupMode::MenuButtonPopup);
+ connect(viewSettings, &KActionMenu::triggered, viewModeActions, &KSelectAction::triggered);