diff options
| author | XY Quadrat <[email protected]> | 2017-10-03 23:07:53 +0200 |
|---|---|---|
| committer | Elvis Angelaccio <[email protected]> | 2017-10-03 23:11:28 +0200 |
| commit | 60ef0fc76b82ef5a4cbf5646c8bc2e3bfe83a2ba (patch) | |
| tree | d42869e65c22b514c5c81292b5fa8b0d9d5cbff2 /src/search | |
| parent | f9bbbd82f43c40971f20a463ad63706ef6f91170 (diff) | |
Add option to only search for folders
This commit adds an option under "More options" at the search widget.
It allows to only search for folders and filter out everything else,
just like the other options (e.g. "Videos") above.
FEATURE: 269334
REVIEW: 130159
Diffstat (limited to 'src/search')
| -rw-r--r-- | src/search/dolphinfacetswidget.cpp | 5 | ||||
| -rw-r--r-- | src/search/dolphinfacetswidget.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/search/dolphinfacetswidget.cpp b/src/search/dolphinfacetswidget.cpp index 023b30c68..482de3ee8 100644 --- a/src/search/dolphinfacetswidget.cpp +++ b/src/search/dolphinfacetswidget.cpp @@ -33,6 +33,7 @@ DolphinFacetsWidget::DolphinFacetsWidget(QWidget* parent) : m_images(0), m_audio(0), m_videos(0), + m_folders(0), m_anytime(0), m_today(0), m_yesterday(0), @@ -52,6 +53,7 @@ DolphinFacetsWidget::DolphinFacetsWidget(QWidget* parent) : m_images = createRadioButton(i18nc("@option:check", "Images"), filetypeGroup); m_audio = createRadioButton(i18nc("@option:check", "Audio Files"), filetypeGroup); m_videos = createRadioButton(i18nc("@option:check", "Videos"), filetypeGroup); + m_folders = createRadioButton(i18nc("@option:check", "Folders"), filetypeGroup); QVBoxLayout* typeLayout = new QVBoxLayout(); typeLayout->setSpacing(0); @@ -60,6 +62,7 @@ DolphinFacetsWidget::DolphinFacetsWidget(QWidget* parent) : typeLayout->addWidget(m_images); typeLayout->addWidget(m_audio); typeLayout->addWidget(m_videos); + typeLayout->addWidget(m_folders); typeLayout->addStretch(); QButtonGroup* timespanGroup = new QButtonGroup(this); @@ -160,6 +163,8 @@ QString DolphinFacetsWidget::facetType() const return QStringLiteral("Audio"); } else if (m_videos->isChecked()) { return QStringLiteral("Video"); + } else if (m_folders->isChecked()) { + return QStringLiteral("Folder"); } return QString(); diff --git a/src/search/dolphinfacetswidget.h b/src/search/dolphinfacetswidget.h index 6f0f0a619..2bf48616e 100644 --- a/src/search/dolphinfacetswidget.h +++ b/src/search/dolphinfacetswidget.h @@ -79,6 +79,7 @@ private: QRadioButton* m_images; QRadioButton* m_audio; QRadioButton* m_videos; + QRadioButton* m_folders; QRadioButton* m_anytime; QRadioButton* m_today; |
