mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
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>
This commit is contained in:
parent
0a58e6d117
commit
8f4e649c68
1 changed files with 9 additions and 3 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue