From dc420beaf2cc4901309d0ba65a2dd61ef64fcc6e Mon Sep 17 00:00:00 2001 From: Don Park Date: Fri, 25 Oct 2013 10:09:34 -0700 Subject: [PATCH] updateWindowTitle() --- interface/src/Application.cpp | 13 +++++++++++++ interface/src/Application.h | 1 + 2 files changed, 14 insertions(+) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 9b66b80c4c..67caadcd44 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -3791,6 +3791,19 @@ void Application::attachNewHeadToNode(Node* newNode) { } } +void Application::updateWindowTitle(){ + QString title = ""; + QString username = _profile.getUsername(); + if(!username.isEmpty()){ + title += _profile.getUsername(); + title += " @ "; + } + title += _profile.getLastDomain(); + + qDebug("Application title set to: %s.\n", title.toStdString().c_str()); + _window->setWindowTitle(title); +} + void Application::domainChanged(QString domain) { qDebug("Application title set to: %s.\n", domain.toStdString().c_str()); _window->setWindowTitle(domain); diff --git a/interface/src/Application.h b/interface/src/Application.h index 6118bfb8b3..3333de3d7a 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -206,6 +206,7 @@ private: void initDisplay(); void init(); + void updateWindowTitle(); void update(float deltaTime);