diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2016-07-17 12:27:01 +0900 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-07-17 12:27:01 +0900 |
commit | 8f4e649c68436a0899aebbd11b5cfc9d86d1f8c6 (patch) | |
tree | 00783258ebe2fae977e330090ca762f102d9039d /desktop-widgets/mainwindow.cpp | |
parent | 0a58e6d11795df7c8d2f0ede4915c147788fa3e6 (diff) | |
download | subsurface-8f4e649c68436a0899aebbd11b5cfc9d86d1f8c6.tar.gz |
If cloud storage is offline, show that in title bar
Not sure if "local cache" is the best text, but it's accurate.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets/mainwindow.cpp')
-rw-r--r-- | desktop-widgets/mainwindow.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp index d4c2317f1..22c57e2fc 100644 --- a/desktop-widgets/mainwindow.cpp +++ b/desktop-widgets/mainwindow.cpp @@ -1679,12 +1679,18 @@ QString MainWindow::displayedFilename(QString fullFilename) QFileInfo fileInfo(f); QString fileName(fileInfo.fileName()); - if (fullFilename.contains(prefs.cloud_git_url)) - return tr("[cloud storage for] %1").arg(fileName.left(fileName.indexOf('['))); - else + if (fullFilename.contains(prefs.cloud_git_url)) { + QString email = fileName.left(fileName.indexOf('[')); + if (prefs.git_local_only) + return tr("[local cache for] %1").arg(email); + else + return tr("[cloud storage for] %1").arg(email); + } else { return fileName; + } } + void MainWindow::setAutomaticTitle() { setTitle(); |