diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2018-09-01 17:46:19 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-09-01 17:46:19 -0700 |
commit | 0ef145337a879e5ff88227117388c9bcac51ad43 (patch) | |
tree | 1fd65f56ab87460411a70051327780ff4b0d08f9 /desktop-widgets | |
parent | c8ff060efe43f3df157232169866cf96aa6f3cca (diff) | |
download | subsurface-0ef145337a879e5ff88227117388c9bcac51ad43.tar.gz |
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 <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets')
-rw-r--r-- | desktop-widgets/downloadfromdivecomputer.cpp | 6 |
1 files 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) |