History

Add domain connection status to window title

Ryan Huffman committed 12 years ago

Commit 0296d0d1 parent d1672b51 file · +4 −1Browse files

Showing the changes to interface/src/Application.cpp (1 of 1 file). Show all

Unified · Split

interface/src/Application.cpp+4−1
@@ -242,6 +242,8 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 241 unmodified lines
242242
243243 connect(&domainHandler, SIGNAL(hostnameChanged(const QString&)), SLOT(domainChanged(const QString&)));
244244 connect(&domainHandler, SIGNAL(connectedToDomain(const QString&)), SLOT(connectedToDomain(const QString&)));
245+ connect(&domainHandler, SIGNAL(connectedToDomain(const QString&)), SLOT(updateWindowTitle()));
246+ connect(&domainHandler, SIGNAL(disconnectedFromDomain()), SLOT(updateWindowTitle()));
245247 connect(&domainHandler, &DomainHandler::settingsReceived, this, &Application::domainSettingsReceived);
246248
247249 // hookup VoxelEditSender to PaymentManager so we can pay for octree edits
@@ -3320,9 +3322,10 @@ void Application::updateWindowTitle(){ · 3072 unmodified lines
33203322 QString buildVersion = " (build " + applicationVersion() + ")";
33213323 NodeList* nodeList = NodeList::getInstance();
33223324
3325+ QString connectionStatus = nodeList->getDomainHandler().isConnected() ? "" : " (NOT CONNECTED) ";
33233326 QString username = AccountManager::getInstance().getAccountInfo().getUsername();
33243327 QString title = QString() + (!username.isEmpty() ? username + " @ " : QString())
3325− + nodeList->getDomainHandler().getHostname() + buildVersion;
3328+ + nodeList->getDomainHandler().getHostname() + connectionStatus + buildVersion;
33263329
33273330 AccountManager& accountManager = AccountManager::getInstance();
33283331 if (accountManager.getAccountInfo().hasBalance()) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t