diff options
-rw-r--r-- | mobile-widgets/qml/DownloadFromDiveComputer.qml | 5 | ||||
-rw-r--r-- | mobile-widgets/qmlmanager.cpp | 11 |
2 files changed, 13 insertions, 3 deletions
diff --git a/mobile-widgets/qml/DownloadFromDiveComputer.qml b/mobile-widgets/qml/DownloadFromDiveComputer.qml index 3b9ed7dfb..ce6f34d5a 100644 --- a/mobile-widgets/qml/DownloadFromDiveComputer.qml +++ b/mobile-widgets/qml/DownloadFromDiveComputer.qml @@ -169,9 +169,10 @@ Kirigami.Page { } } } - Kirigami.Label { - text: qsTr(" Downloaded dives") + text: divesDownloaded ? qsTr(" Downloaded dives") : + (manager.progressMessage != "" ? qsTr("Info:") + " " + manager.progressMessage : qsTr(" No dives")) + wrapMode: Text.WrapAtWordBoundaryOrAnywhere } ListView { diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index 9e8ee226f..c46832fcd 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -33,6 +33,15 @@ QMLManager *QMLManager::m_instance = NULL; #define NOCLOUD_LOCALSTORAGE format_string("%s/cloudstorage/localrepo[master]", system_default_directory()) +static void progressCallback(const char *text) +{ + QMLManager *self = QMLManager::instance(); + if (self) { + self->appendTextToLog(QString(text)); + self->setProgressMessage(QString(text)); + } +} + static void appendTextToLogStandalone(const char *text) { QMLManager *self = QMLManager::instance(); @@ -93,7 +102,7 @@ QMLManager::QMLManager() : m_locationServiceEnabled(false), setShowPin(false); // create location manager service locationProvider = new GpsLocation(&appendTextToLogStandalone, this); - progress_callback = &appendTextToLogStandalone; + progress_callback = &progressCallback; connect(locationProvider, SIGNAL(haveSourceChanged()), this, SLOT(hasLocationSourceChanged())); setLocationServiceAvailable(locationProvider->hasLocationsSource()); set_git_update_cb(&gitProgressCB); |