diff --git a/src/icons/16x16/actions/dialog-warning.png b/src/icons/16x16/actions/dialog-warning.png new file mode 100644 index 00000000..43ca31a3 Binary files /dev/null and b/src/icons/16x16/actions/dialog-warning.png differ diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index a3abd782..a9bec844 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -161,6 +161,7 @@ MainWindow::MainWindow(QMap *joysticks, connect(ui->actionGitHubPage, SIGNAL(triggered()), this, SLOT(openGitHubPage())); connect(ui->actionOptions, SIGNAL(triggered()), this, SLOT(openMainSettingsDialog())); connect(ui->actionWiki, SIGNAL(triggered()), this, SLOT(openWikiPage())); + connect(ui->updateButton, &QPushButton::pressed, this, &MainWindow::updateButtonPressed); #ifdef USE_SDL_2 connect(ui->actionGameController_Mapping, SIGNAL(triggered()), this, SLOT(openGameControllerMappingWindow())); @@ -1174,6 +1175,26 @@ 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...\nPress 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/")); + } +} + /** * @brief Build list of current input devices and pass it to settings dialog * instance. Open Settings dialog. diff --git a/src/mainwindow.h b/src/mainwindow.h index 9c148afd..86bf0c53 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -93,6 +93,7 @@ class MainWindow : public QMainWindow private: Ui::MainWindow *ui; + void updateButtonPressed(); signals: void joystickRefreshRequested(); diff --git a/src/mainwindow.ui b/src/mainwindow.ui index 2f3f8d50..33606c43 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -115,7 +115,16 @@ QPushButton#namesPushButton[isDisplayingNames="true"] { - + + 0 + + + 0 + + + 0 + + 0 @@ -159,6 +168,18 @@ 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. + + + + :/icons/16x16/actions/dialog-warning.png:/icons/16x16/actions/dialog-warning.png + + + @@ -183,7 +204,7 @@ QPushButton#namesPushButton[isDisplayingNames="true"] { 0 0 650 - 21 + 20 @@ -221,8 +242,7 @@ QPushButton#namesPushButton[isDisplayingNames="true"] { - - + .. &Quit @@ -237,8 +257,7 @@ QPushButton#namesPushButton[isDisplayingNames="true"] { - - + .. &Update Joysticks @@ -250,8 +269,7 @@ QPushButton#namesPushButton[isDisplayingNames="true"] { - - + .. &Hide @@ -263,8 +281,7 @@ QPushButton#namesPushButton[isDisplayingNames="true"] { - - + .. &About diff --git a/src/resources.qrc b/src/resources.qrc index 9b1eda65..74a5089b 100644 --- a/src/resources.qrc +++ b/src/resources.qrc @@ -8,5 +8,6 @@ Changelog icons/16x16/actions/document-save.png icons/16x16/actions/document-open-folder.png + icons/16x16/actions/dialog-warning.png - + \ No newline at end of file diff --git a/src/resources_windows.qrc b/src/resources_windows.qrc index 0a082ae1..fac39582 100644 --- a/src/resources_windows.qrc +++ b/src/resources_windows.qrc @@ -26,5 +26,6 @@ icons/16x16/actions/edit-table-insert-row-below.png icons/16x16/actions/help-about.png icons/16x16/actions/view-fullscreen.png + icons/16x16/actions/dialog-warning.png