diff options
| author | Christoph Feck <[email protected]> | 2020-08-05 09:43:32 +0200 |
|---|---|---|
| committer | Christoph Feck <[email protected]> | 2020-08-05 09:43:32 +0200 |
| commit | 5c41350eec59e28d12a1ba7c0fc47a09625d3808 (patch) | |
| tree | 31d27dd6f23b5e9ae0ca556380d6b20f6ceecb60 | |
| parent | e9e74dcad94a52fb36ec9639049f01f93d6c8af4 (diff) | |
| parent | 73cac464c5db30ad60b886b8c65c2d1599310d8d (diff) | |
Merge branch 'master' of invent.kde.org:system/dolphin
| -rw-r--r-- | src/org.kde.dolphin.appdata.xml | 1 | ||||
| -rw-r--r-- | src/search/dolphinfacetswidget.cpp | 8 | ||||
| -rw-r--r-- | src/settings/general/previewssettingspage.cpp | 12 |
3 files changed, 15 insertions, 6 deletions
diff --git a/src/org.kde.dolphin.appdata.xml b/src/org.kde.dolphin.appdata.xml index 2d887fc25..e451c1ba6 100644 --- a/src/org.kde.dolphin.appdata.xml +++ b/src/org.kde.dolphin.appdata.xml @@ -567,6 +567,7 @@ <caption xml:lang="ca">Gestió de fitxers al Dolphin</caption> <caption xml:lang="ca-valencia">Gestió de fitxers al Dolphin</caption> <caption xml:lang="cs">Správa souborů v Dolphinu</caption> + <caption xml:lang="da">Filhåndtering i Dolphin</caption> <caption xml:lang="de">Dateiverwaltung mit Dolphin</caption> <caption xml:lang="el">Διαχείριση αρχείων στο Dolphin</caption> <caption xml:lang="en-GB">File management in Dolphin</caption> diff --git a/src/search/dolphinfacetswidget.cpp b/src/search/dolphinfacetswidget.cpp index d9943abcd..8bae83887 100644 --- a/src/search/dolphinfacetswidget.cpp +++ b/src/search/dolphinfacetswidget.cpp @@ -272,12 +272,14 @@ void DolphinFacetsWidget::updateTagsMenuItems(const QUrl&, const KFileItemList& allTags.sort(Qt::CaseInsensitive); allTags.removeDuplicates(); + const bool onlyOneTag = allTags.count() == 1; + for (const QString& tagName : qAsConst(allTags)) { QAction* action = m_tagsSelector->menu()->addAction(QIcon::fromTheme(QStringLiteral("tag")), tagName); action->setCheckable(true); action->setChecked(m_searchTags.contains(tagName)); - connect(action, &QAction::triggered, this, [this, tagName](bool isChecked) { + connect(action, &QAction::triggered, this, [this, tagName, onlyOneTag](bool isChecked) { if (isChecked) { addSearchTag(tagName); } else { @@ -285,7 +287,9 @@ void DolphinFacetsWidget::updateTagsMenuItems(const QUrl&, const KFileItemList& } emit facetChanged(); - m_tagsSelector->menu()->show(); + if (!onlyOneTag) { + m_tagsSelector->menu()->show(); + } }); } diff --git a/src/settings/general/previewssettingspage.cpp b/src/settings/general/previewssettingspage.cpp index 3e435b53c..e52304888 100644 --- a/src/settings/general/previewssettingspage.cpp +++ b/src/settings/general/previewssettingspage.cpp @@ -131,10 +131,14 @@ void PreviewsSettingsPage::applySettings() KConfigGroup globalConfig(KSharedConfig::openConfig(), QStringLiteral("PreviewSettings")); globalConfig.writeEntry("Plugins", m_enabledPreviewPlugins); - const qulonglong maximumLocalSize = static_cast<qulonglong>(m_localFileSizeBox->value()) * 1024 * 1024; - globalConfig.writeEntry("MaximumSize", - maximumLocalSize, - KConfigBase::Normal | KConfigBase::Global); + if (!m_localFileSizeBox->value()) { + globalConfig.deleteEntry("MaximumSize", KConfigBase::Normal | KConfigBase::Global); + } else { + const qulonglong maximumLocalSize = static_cast<qulonglong>(m_localFileSizeBox->value()) * 1024 * 1024; + globalConfig.writeEntry("MaximumSize", + maximumLocalSize, + KConfigBase::Normal | KConfigBase::Global); + } const qulonglong maximumRemoteSize = static_cast<qulonglong>(m_remoteFileSizeBox->value()) * 1024 * 1024; globalConfig.writeEntry("MaximumRemoteSize", |
