History

Merge branch 'master' of https://github.com/highfidelity/hifi

Andrzej Kapolka committed 12 years ago

Commit 3f478b12 parents e22d239 ee66d873 files · +42 −29Browse files

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

Unified · Split

interface/src/Application.cpp+15−12
@@ -172,7 +172,8 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 171 unmodified lines
172172 _nodeBoundsDisplay(this),
173173 _previousScriptLocation(),
174174 _runningScriptsWidget(new RunningScriptsWidget(_window)),
175− _runningScriptsWidgetWasVisible(false)
175+ _runningScriptsWidgetWasVisible(false),
176+ _trayIcon(new QSystemTrayIcon(_window))
176177 {
177178 // read the ApplicationInfo.ini file for Name/Version/Domain information
178179 QSettings applicationInfo(Application::resourcesPath() + "info/ApplicationInfo.ini", QSettings::IniFormat);
@@ -242,7 +243,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 63 unmodified lines
242243 QTimer* locationUpdateTimer = new QTimer(this);
243244 connect(locationUpdateTimer, &QTimer::timeout, this, &Application::updateLocationInServer);
244245 locationUpdateTimer->start(DATA_SERVER_LOCATION_CHANGE_UPDATE_MSECS);
245−
246+
246247 connect(nodeList, &NodeList::nodeAdded, this, &Application::nodeAdded);
247248 connect(nodeList, &NodeList::nodeKilled, this, &Application::nodeKilled);
248249 connect(nodeList, SIGNAL(nodeKilled(SharedNodePointer)), SLOT(nodeKilled(SharedNodePointer)));
@@ -251,16 +252,16 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 2 unmodified lines
251252 connect(nodeList, &NodeList::uuidChanged, this, &Application::updateWindowTitle);
252253 connect(nodeList, SIGNAL(uuidChanged(const QUuid&)), _myAvatar, SLOT(setSessionUUID(const QUuid&)));
253254 connect(nodeList, &NodeList::limitOfSilentDomainCheckInsReached, nodeList, &NodeList::reset);
254−
255+
255256 // connect to appropriate slots on AccountManager
256257 AccountManager& accountManager = AccountManager::getInstance();
257−
258+
258259 const qint64 BALANCE_UPDATE_INTERVAL_MSECS = 5 * 1000;
259−
260+
260261 QTimer* balanceUpdateTimer = new QTimer(this);
261262 connect(balanceUpdateTimer, &QTimer::timeout, &accountManager, &AccountManager::updateBalance);
262263 balanceUpdateTimer->start(BALANCE_UPDATE_INTERVAL_MSECS);
263−
264+
264265 connect(&accountManager, &AccountManager::balanceChanged, this, &Application::updateWindowTitle);
265266
266267 connect(&accountManager, &AccountManager::authRequired, Menu::getInstance(), &Menu::loginForCurrentDomain);
@@ -391,6 +392,8 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 124 unmodified lines
391392 OAuthWebViewHandler::getInstance();
392393 // make sure the High Fidelity root CA is in our list of trusted certs
393394 OAuthWebViewHandler::addHighFidelityRootCAToSSLConfig();
395+
396+ _trayIcon->show();
394397 }
395398
396399 Application::~Application() {
@@ -562,7 +565,7 @@ void Application::paintGL() { · 165 unmodified lines
562565 PerformanceWarning warn(showWarnings, "Application::paintGL()");
563566
564567 glEnable(GL_LINE_SMOOTH);
565−
568+
566569 if (_myCamera.getMode() == CAMERA_MODE_FIRST_PERSON) {
567570 _myCamera.setTightness(0.0f); // In first person, camera follows (untweaked) head exactly without delay
568571 _myCamera.setTargetPosition(_myAvatar->getHead()->calculateAverageEyePosition());
@@ -3110,18 +3113,18 @@ void Application::updateWindowTitle(){ · 2541 unmodified lines
31103113 QString username = AccountManager::getInstance().getAccountInfo().getUsername();
31113114 QString title = QString() + (!username.isEmpty() ? username + " @ " : QString())
31123115 + nodeList->getDomainHandler().getHostname() + buildVersion;
3113−
3116+
31143117 AccountManager& accountManager = AccountManager::getInstance();
31153118 if (accountManager.getAccountInfo().hasBalance()) {
31163119 float creditBalance = accountManager.getAccountInfo().getBalance() / SATOSHIS_PER_CREDIT;
3117−
3120+
31183121 QString creditBalanceString;
31193122 creditBalanceString.sprintf("%.8f", creditBalance);
3120−
3123+
31213124 title += " - ₵" + creditBalanceString;
31223125 }
3123−
3124− qDebug("Application title set to: %s", title.toStdString().c_str());
3126+
3127+ qDebug("Application title set to: %s", title.toStdString().c_str());
31253128 _window->setWindowTitle(title);
31263129 }
31273130

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