From 7d162ed3c933b5b5bbbe854f481041b25b8d3bb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Kotiuk?= Date: Fri, 4 Nov 2022 22:44:07 +0100 Subject: [PATCH] Add popup with information --- src/mainwindow.cpp | 17 ++++++++++++++++- src/mainwindow.ui | 4 ++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 6b02b0f3..6dfbec36 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1176,8 +1176,23 @@ void MainWindow::changeStartSetNumber(unsigned int startSetNumber, unsigned int } void MainWindow::updateButtonPressed() { + QMessageBox *box = new QMessageBox(this); + box->setText( + tr("AntiMicro is no longer maintained anymore, it won't get any new " + "features or bug fixes. This is the last release of AntiMicro.\nIt is " + "recommended to migrate to new, currently developed version of this " + "app called AntiMicroX. It contains a lot of bug fixes and new " + "features like: showing battery status, mapping gamepad moves with " + "gyroscope, proper calibration and many more...\n press Open to to open " + "AntiMicroX website.")); + box->setWindowTitle(tr("Deprecation Notice")); + box->setStandardButtons(QMessageBox::Cancel | QMessageBox::Open); + int ret = box->exec(); + if (ret == QMessageBox::Open) { qInfo() << "Opening antimicrox website"; - QDesktopServices::openUrl(QUrl("https://github.com/antiMicroX/antimicrox/")); + QDesktopServices::openUrl( + QUrl("https://github.com/antiMicroX/antimicrox/")); + } } /** diff --git a/src/mainwindow.ui b/src/mainwindow.ui index 4cac3db5..1fd6681e 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -171,8 +171,8 @@ QPushButton#namesPushButton[isDisplayingNames="true"] { - Antimicro is no longer maintained and won't receive any more updates. -Click here to get AntimicroX, an updated fork of this app. + AntiMicro is no longer maintained and won't receive any more updates. +Click here to get AntiMicroX, an updated fork of this app.