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
242 242
243 connect(&domainHandler, SIGNAL(hostnameChanged(const QString&)), SLOT(domainChanged(const QString&)));243 connect(&domainHandler, SIGNAL(hostnameChanged(const QString&)), SLOT(domainChanged(const QString&)));
244 connect(&domainHandler, SIGNAL(connectedToDomain(const QString&)), SLOT(connectedToDomain(const QString&)));244 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()));
245 connect(&domainHandler, &DomainHandler::settingsReceived, this, &Application::domainSettingsReceived);247 connect(&domainHandler, &DomainHandler::settingsReceived, this, &Application::domainSettingsReceived);
246 248
247 // hookup VoxelEditSender to PaymentManager so we can pay for octree edits249 // hookup VoxelEditSender to PaymentManager so we can pay for octree edits
@@ -3320,9 +3322,10 @@ void Application::updateWindowTitle(){ · 3072 unmodified lines
3320 QString buildVersion = " (build " + applicationVersion() + ")";3322 QString buildVersion = " (build " + applicationVersion() + ")";
3321 NodeList* nodeList = NodeList::getInstance();3323 NodeList* nodeList = NodeList::getInstance();
3322 3324
3325 QString connectionStatus = nodeList->getDomainHandler().isConnected() ? "" : " (NOT CONNECTED) ";
3323 QString username = AccountManager::getInstance().getAccountInfo().getUsername();3326 QString username = AccountManager::getInstance().getAccountInfo().getUsername();
3324 QString title = QString() + (!username.isEmpty() ? username + " @ " : QString())3327 QString title = QString() + (!username.isEmpty() ? username + " @ " : QString())
3325 + nodeList->getDomainHandler().getHostname() + buildVersion;3328 + nodeList->getDomainHandler().getHostname() + connectionStatus + buildVersion;
3326 3329
3327 AccountManager& accountManager = AccountManager::getInstance();3330 AccountManager& accountManager = AccountManager::getInstance();
3328 if (accountManager.getAccountInfo().hasBalance()) {3331 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