mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 14:03:55 +02:00
Make Interface title say if user not logged in
This commit is contained in:
parent
c637649805
commit
c76bb01359
1 changed files with 8 additions and 4 deletions
|
@ -4568,11 +4568,15 @@ void Application::resetSensors(bool andReload) {
|
|||
|
||||
void Application::updateWindowTitle() const {
|
||||
|
||||
QString buildVersion = " (build " + applicationVersion() + ")";
|
||||
auto nodeList = DependencyManager::get<NodeList>();
|
||||
auto accountManager = DependencyManager::get<AccountManager>();
|
||||
|
||||
QString connectionStatus = nodeList->getDomainHandler().isConnected() ? "" : " (NOT CONNECTED) ";
|
||||
QString username = DependencyManager::get<AccountManager>()->getAccountInfo().getUsername();
|
||||
QString buildVersion = " (build " + applicationVersion() + ")";
|
||||
|
||||
QString loginStatus = accountManager->isLoggedIn() ? "" : " (NOT LOGGED IN)";
|
||||
|
||||
QString connectionStatus = nodeList->getDomainHandler().isConnected() ? "" : " (NOT CONNECTED)";
|
||||
QString username = accountManager->getAccountInfo().getUsername();
|
||||
QString currentPlaceName = DependencyManager::get<AddressManager>()->getHost();
|
||||
|
||||
if (currentPlaceName.isEmpty()) {
|
||||
|
@ -4580,7 +4584,7 @@ void Application::updateWindowTitle() const {
|
|||
}
|
||||
|
||||
QString title = QString() + (!username.isEmpty() ? username + " @ " : QString())
|
||||
+ currentPlaceName + connectionStatus + buildVersion;
|
||||
+ currentPlaceName + connectionStatus + loginStatus + buildVersion;
|
||||
|
||||
#ifndef WIN32
|
||||
// crashes with vs2013/win32
|
||||
|
|
Loading…
Reference in a new issue