Use Version singleton to set window title
This commit is contained in:
+1
-19
@@ -363,30 +363,12 @@ void Window::addMenuBar()
|
|||||||
[=] { this->notebook_->selectPreviousTab(); });
|
[=] { this->notebook_->selectPreviousTab(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
#define UGLYMACROHACK1(s) #s
|
|
||||||
#define UGLYMACROHACK(s) UGLYMACROHACK1(s)
|
|
||||||
|
|
||||||
void Window::onAccountSelected()
|
void Window::onAccountSelected()
|
||||||
{
|
{
|
||||||
auto user = getApp()->accounts->twitch.getCurrent();
|
auto user = getApp()->accounts->twitch.getCurrent();
|
||||||
|
|
||||||
// update title
|
// update title
|
||||||
QString title = "Chatterino ";
|
this->setWindowTitle(Version::getInstance().getFullVersion());
|
||||||
if (Modes::getInstance().isNightly)
|
|
||||||
{
|
|
||||||
title += "Nightly ";
|
|
||||||
}
|
|
||||||
title += CHATTERINO_VERSION;
|
|
||||||
|
|
||||||
if (Modes::getInstance().isNightly)
|
|
||||||
{
|
|
||||||
#ifdef CHATTERINO_NIGHTLY_VERSION_STRING
|
|
||||||
title +=
|
|
||||||
QString(" (" UGLYMACROHACK(CHATTERINO_NIGHTLY_VERSION_STRING) ")");
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
this->setWindowTitle(title);
|
|
||||||
|
|
||||||
// update user
|
// update user
|
||||||
if (user->isAnon())
|
if (user->isAnon())
|
||||||
|
|||||||
Reference in New Issue
Block a user