From 04547a92067fef191c3a8669a8af8e83db5f315d Mon Sep 17 00:00:00 2001 From: 3djc Date: Mon, 18 Dec 2017 23:02:40 +0100 Subject: [PATCH] Merge companion and firmware notes, and get them from the server (#5530) --- companion/src/mainwindow.cpp | 15 ++------------- companion/src/mainwindow.h | 2 -- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/companion/src/mainwindow.cpp b/companion/src/mainwindow.cpp index 3e02af58d..43e4d09f6 100644 --- a/companion/src/mainwindow.cpp +++ b/companion/src/mainwindow.cpp @@ -1048,18 +1048,11 @@ void MainWindow::sdsync() } void MainWindow::changelog() -{ - ReleaseNotesDialog * dialog = new ReleaseNotesDialog(this); - dialog->exec(); - dialog->deleteLater(); -} - -void MainWindow::fwchangelog() { Firmware * firmware = getCurrentFirmware(); QString url = firmware->getReleaseNotesUrl(); if (url.isEmpty()) { - QMessageBox::information(this, tr("Firmware updates"), tr("Current firmware does not provide release notes informations.")); + QMessageBox::information(this, tr("Release notes"), tr("Cannot retrieve release notes from the server.")); } else { ReleaseNotesFirmwareDialog * dialog = new ReleaseNotesFirmwareDialog(this, url); @@ -1370,8 +1363,7 @@ void MainWindow::retranslateUi(bool showMsg) trAct(appPrefsAct, tr("Settings..."), tr("Edit Settings")); trAct(fwPrefsAct, tr("Download..."), tr("Download firmware and voice files")); trAct(checkForUpdatesAct, tr("Check for Updates..."), tr("Check OpenTX and Companion updates")); - trAct(changelogAct, tr("Companion Changes..."), tr("Show Companion change log")); - trAct(fwchangelogAct, tr("Firmware Changes..."), tr("Show firmware change log")); + trAct(changelogAct, tr("Release notes..."), tr("Show release notes")); trAct(compareAct, tr("Compare Models..."), tr("Compare models")); trAct(editSplashAct, tr("Edit Radio Splash Image..."), tr("Edit the splash image of your Radio")); trAct(burnListAct, tr("List programmers..."), tr("List available programmers")); @@ -1456,7 +1448,6 @@ void MainWindow::createActions() aboutAct = addAct("information.png", SLOT(about())); openDocURLAct = addAct("changelog.png", SLOT(openDocURL())); changelogAct = addAct("changelog.png", SLOT(changelog())); - fwchangelogAct = addAct("changelog.png", SLOT(fwchangelog())); contributorsAct = addAct("contributors.png", SLOT(contributors())); // these two get assigned menus in createMenus() @@ -1470,7 +1461,6 @@ void MainWindow::createActions() openDocURLAct->setMenuRole(QAction::ApplicationSpecificRole); checkForUpdatesAct->setMenuRole(QAction::ApplicationSpecificRole); changelogAct->setMenuRole(QAction::ApplicationSpecificRole); - fwchangelogAct->setMenuRole(QAction::ApplicationSpecificRole); actTabbedWindows->setCheckable(true); compareAct->setEnabled(false); @@ -1554,7 +1544,6 @@ void MainWindow::createMenus() helpMenu->addAction(openDocURLAct); helpMenu->addSeparator(); helpMenu->addAction(changelogAct); - helpMenu->addAction(fwchangelogAct); helpMenu->addSeparator(); helpMenu->addAction(contributorsAct); diff --git a/companion/src/mainwindow.h b/companion/src/mainwindow.h index dad7f5a91..9f38bbc03 100644 --- a/companion/src/mainwindow.h +++ b/companion/src/mainwindow.h @@ -118,7 +118,6 @@ class MainWindow : public QMainWindow void contributors(); void sdsync(); void changelog(); - void fwchangelog(); void customizeSplash(); void about(); void compare(); @@ -203,7 +202,6 @@ class MainWindow : public QMainWindow QAction *contributorsAct; QAction *sdsyncAct; QAction *changelogAct; - QAction *fwchangelogAct; QAction *compareAct; QAction *editSplashAct; QAction *writeEepromAct;