mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +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);
|
QFileInfo fileInfo(f);
|
||||||
QString fileName(fileInfo.fileName());
|
QString fileName(fileInfo.fileName());
|
||||||
|
|
||||||
if (fullFilename.contains(prefs.cloud_git_url))
|
if (fullFilename.contains(prefs.cloud_git_url)) {
|
||||||
return tr("[cloud storage for] %1").arg(fileName.left(fileName.indexOf('[')));
|
QString email = fileName.left(fileName.indexOf('['));
|
||||||
|
if (prefs.git_local_only)
|
||||||
|
return tr("[local cache for] %1").arg(email);
|
||||||
else
|
else
|
||||||
|
return tr("[cloud storage for] %1").arg(email);
|
||||||
|
} else {
|
||||||
return fileName;
|
return fileName;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::setAutomaticTitle()
|
void MainWindow::setAutomaticTitle()
|
||||||
{
|
{
|
||||||
setTitle();
|
setTitle();
|
||||||
|
|
Loading…
Add table
Reference in a new issue