From 0ef145337a879e5ff88227117388c9bcac51ad43 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 1 Sep 2018 17:46:19 -0700 Subject: Desktop: allow using a file dialog to find Garmin folder If we don't auto-detect where the Garmin Descent is mounted, the user can either just type in the correct path, or can use a file diealog to specify it. Signed-off-by: Dirk Hohndel --- desktop-widgets/downloadfromdivecomputer.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/desktop-widgets/downloadfromdivecomputer.cpp b/desktop-widgets/downloadfromdivecomputer.cpp index c0e081251..b37f854bc 100644 --- a/desktop-widgets/downloadfromdivecomputer.cpp +++ b/desktop-widgets/downloadfromdivecomputer.cpp @@ -248,9 +248,11 @@ void DownloadFromDCWidget::on_product_currentIndexChanged(const QString &) void DownloadFromDCWidget::on_search_clicked() { - if (ui.vendor->currentText() == "Uemis") { + if (ui.vendor->currentText() == "Uemis" || ui.vendor->currentText() == "Garmin") { + QString dialogTitle = ui.vendor->currentText() == "Uemis" ? + tr("Find Uemis dive computer") : tr("Find Garmin dive computer"); QString dirName = QFileDialog::getExistingDirectory(this, - tr("Find Uemis dive computer"), + dialogTitle, QDir::homePath(), QFileDialog::ShowDirsOnly); if (ui.device->findText(dirName) == -1) -- cgit v1.2.3-70-g09d2