update 2.1.0

This commit is contained in:
fourtf
2019-08-18 20:14:00 +02:00
parent 18fb160094
commit 23f1dd4646
13 changed files with 127 additions and 90 deletions
-1
View File
@@ -97,7 +97,6 @@ private:
void addCustomButtons();
pajlada::Signals::SignalHolder signalHolder_;
std::shared_ptr<UpdateDialog> updateDialogHandle_;
std::vector<pajlada::Signals::ScopedConnection> connections_;
};
+17 -17
View File
@@ -115,27 +115,27 @@ void Window::showEvent(QShowEvent *event)
{
getSettings()->startUpNotification = 1;
auto box = new QMessageBox(
QMessageBox::Information, "Chatterino 2 Beta",
"Please note that this software is not stable yet. Things are "
"rough "
"around the edges and everything is subject to change.");
box->setAttribute(Qt::WA_DeleteOnClose);
box->show();
// auto box = new QMessageBox(
// QMessageBox::Information, "Chatterino 2 Beta",
// "Please note that this software is not stable yet. Things are "
// "rough "
// "around the edges and everything is subject to change.");
// box->setAttribute(Qt::WA_DeleteOnClose);
// box->show();
}
// Show changelog
if (getSettings()->currentVersion.getValue() != "" &&
getSettings()->currentVersion.getValue() != CHATTERINO_VERSION)
{
auto box = new QMessageBox(QMessageBox::Information,
"Chatterino 2 Beta", "Show changelog?",
auto box = new QMessageBox(QMessageBox::Information, "Chatterino 2",
"Show changelog?",
QMessageBox::Yes | QMessageBox::No);
box->setAttribute(Qt::WA_DeleteOnClose);
if (box->exec() == QMessageBox::Yes)
{
QDesktopServices::openUrl(
QUrl("https://fourtf.com/chatterino-changelog/"));
QUrl("https://www.chatterino.com/changelog"));
}
}
@@ -372,13 +372,13 @@ void Window::onAccountSelected()
{
auto user = getApp()->accounts->twitch.getCurrent();
#ifdef CHATTERINO_NIGHTLY_VERSION_STRING
auto windowTitleEnd =
QString("Chatterino Nightly " CHATTERINO_VERSION
" (" UGLYMACROHACK(CHATTERINO_NIGHTLY_VERSION_STRING) ")");
#else
auto windowTitleEnd = QString("Chatterino Beta " CHATTERINO_VERSION);
#endif
//#ifdef CHATTERINO_NIGHTLY_VERSION_STRING
// auto windowTitleEnd =
// QString("Chatterino Nightly " CHATTERINO_VERSION
// " (" UGLYMACROHACK(CHATTERINO_NIGHTLY_VERSION_STRING) ")");
//#else
auto windowTitleEnd = QString("Chatterino " CHATTERINO_VERSION);
//#endif
this->setWindowTitle(windowTitleEnd);
+1 -1
View File
@@ -88,7 +88,7 @@ BasicLoginWidget::BasicLoginWidget()
this->setLayout(&this->ui_.layout);
this->ui_.loginButton.setText("Log in (Opens in browser)");
this->ui_.pasteCodeButton.setText("Paste code");
this->ui_.pasteCodeButton.setText("Paste login info");
this->ui_.horizontalLayout.addWidget(&this->ui_.loginButton);
this->ui_.horizontalLayout.addWidget(&this->ui_.pasteCodeButton);
+7 -2
View File
@@ -26,8 +26,10 @@ UpdateDialog::UpdateDialog()
this->ui_.installButton = install;
auto dismiss = buttons->addButton("Dismiss", QDialogButtonBox::RejectRole);
QObject::connect(install, &QPushButton::clicked, this,
[this] { this->close(); });
QObject::connect(install, &QPushButton::clicked, this, [this] {
Updates::getInstance().installUpdates();
this->close();
});
QObject::connect(dismiss, &QPushButton::clicked, this, [this] {
this->buttonClicked.invoke(Dismiss);
this->close();
@@ -37,6 +39,8 @@ UpdateDialog::UpdateDialog()
this->connections_.managedConnect(
Updates::getInstance().statusUpdated,
[this](auto status) { this->updateStatusChanged(status); });
this->setScaleIndependantHeight(150);
}
void UpdateDialog::updateStatusChanged(Updates::Status status)
@@ -51,6 +55,7 @@ void UpdateDialog::updateStatusChanged(Updates::Status status)
QString("An update (%1) is available.\n\nDo you want to "
"download and install it?")
.arg(Updates::getInstance().getOnlineVersion()));
this->updateGeometry();
}
break;