From f486e6fa4e5893c4f437147e5a031e64b48035e7 Mon Sep 17 00:00:00 2001 From: Chris Bessent Date: Thu, 11 Feb 2021 18:39:06 -0700 Subject: Updates to text, title and buttons --- src/updatedialog.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/updatedialog.cpp') diff --git a/src/updatedialog.cpp b/src/updatedialog.cpp index 1be58576..d3336e93 100644 --- a/src/updatedialog.cpp +++ b/src/updatedialog.cpp @@ -6,12 +6,11 @@ using namespace MOBase; -UpdateDialog::UpdateDialog(QWidget* parent, const QString& title) : +UpdateDialog::UpdateDialog(QWidget* parent) : QDialog(parent, Qt::WindowMaximizeButtonHint | Qt::WindowCloseButtonHint), ui(new Ui::UpdateDialog) { // Basic UI stuff ui->setupUi(this); - setWindowTitle(title); connect(ui->installButton, &QPushButton::pressed, this, [&]{ done(QDialog::Accepted); }); connect(ui->cancelButton, &QPushButton::pressed, this, [&]{ done(QDialog::Rejected); }); @@ -57,3 +56,12 @@ void UpdateDialog::setChangeLogs(const QString& text) { m_changeLogs.setText(text); } + +void UpdateDialog::setVersions(const QString& oldVersion, const QString& newVersion) +{ + ui->updateLabel->setText( + tr("Mod Organizer %1 is available. The current version is %2. Updating will not affect your mods or profiles.") + .arg(newVersion) + .arg(oldVersion) + ); +} -- cgit v1.3.1