summaryrefslogtreecommitdiffstats
path: root/desktop-widgets
diff options
context:
space:
mode:
authorGravatar Stefan Fuchs <sfuchs@gmx.de>2018-07-13 21:06:28 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-07-15 09:38:12 -0700
commitbb2dfdfe5448eb7616c0d2eb432c633bce2a520a (patch)
treeeda0d1686e6611539032bd89630de14aae8b8deb /desktop-widgets
parent669277d49004fefc320906297a1c08a26e6d99d7 (diff)
downloadsubsurface-bb2dfdfe5448eb7616c0d2eb432c633bce2a520a.tar.gz
For media file open dialog add different file filters
On top of the file filter for all media files add a file filter for images only, one for videos only and one for all files. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
Diffstat (limited to 'desktop-widgets')
-rw-r--r--desktop-widgets/divelistview.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/desktop-widgets/divelistview.cpp b/desktop-widgets/divelistview.cpp
index 647a7fdcc..5c80813ab 100644
--- a/desktop-widgets/divelistview.cpp
+++ b/desktop-widgets/divelistview.cpp
@@ -922,11 +922,17 @@ void DiveListView::shiftTimes()
void DiveListView::loadImages()
{
- QStringList filters = imageExtensionFilters();
+ QStringList m_filters = mediaExtensionFilters();
+ QStringList i_filters = imageExtensionFilters();
+ QStringList v_filters = videoExtensionFilters();
QStringList fileNames = QFileDialog::getOpenFileNames(this,
tr("Open media files"),
lastUsedImageDir(),
- tr("Media files (%1)").arg(filters.join(" ")));
+ QString("%1 (%2);;%3 (%4);;%5 (%6);;%7 (*.*)")
+ .arg(tr("Media files"), m_filters.join(" ")
+ , tr("Image files"), i_filters.join(" ")
+ , tr("Video files"), v_filters.join(" ")
+ , tr("All files")));
if (fileNames.isEmpty())
return;