mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
QML UI: Download from DC: tell user if BT is disabled
This makes much more sense than displaying "No dives" Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
be8eedb773
commit
04213e1f03
1 changed files with 2 additions and 1 deletions
|
|
@ -18,6 +18,7 @@ Kirigami.Page {
|
||||||
property alias dcImportModel: importModel
|
property alias dcImportModel: importModel
|
||||||
property bool divesDownloaded: false
|
property bool divesDownloaded: false
|
||||||
property bool btEnabled: manager.btEnabled()
|
property bool btEnabled: manager.btEnabled()
|
||||||
|
property string btMessage: manager.btEnabled() ? "" : qsTr("Bluetooth is not enabled")
|
||||||
|
|
||||||
DCDownloadThread {
|
DCDownloadThread {
|
||||||
id: downloadThread
|
id: downloadThread
|
||||||
|
|
@ -217,7 +218,7 @@ Kirigami.Page {
|
||||||
Kirigami.Label {
|
Kirigami.Label {
|
||||||
Layout.maximumWidth: parent.width - download.width - quitbutton.width
|
Layout.maximumWidth: parent.width - download.width - quitbutton.width
|
||||||
text: divesDownloaded ? qsTr(" Downloaded dives") :
|
text: divesDownloaded ? qsTr(" Downloaded dives") :
|
||||||
(manager.progressMessage != "" ? qsTr("Info:") + " " + manager.progressMessage : qsTr(" No dives"))
|
(manager.progressMessage != "" ? qsTr("Info:") + " " + manager.progressMessage : btMessage)
|
||||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue