From c76bb01359f45173d7415e8f9be63b052b7ddc34 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Fri, 7 Oct 2016 15:39:46 +1300 Subject: [PATCH] Make Interface title say if user not logged in --- interface/src/Application.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 610144b2cc..c7101f7434 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -4568,11 +4568,15 @@ void Application::resetSensors(bool andReload) { void Application::updateWindowTitle() const { - QString buildVersion = " (build " + applicationVersion() + ")"; auto nodeList = DependencyManager::get(); + auto accountManager = DependencyManager::get(); - QString connectionStatus = nodeList->getDomainHandler().isConnected() ? "" : " (NOT CONNECTED) "; - QString username = DependencyManager::get()->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()->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