mirror of
https://github.com/opentx/opentx.git
synced 2025-07-25 17:25:13 +03:00
Merge remote-tracking branch 'origin/dvogonen/rename_companion_485' into next
Conflicts: companion/src/CMakeLists.txt companion/src/main.cpp companion/src/modeledit.cpp companion/src/xsimulatordialog.cpp
This commit is contained in:
commit
e7dc6644c7
76 changed files with 4784 additions and 4176 deletions
|
@ -103,9 +103,9 @@ downloadDialog_forWait(NULL)
|
|||
readSettings();
|
||||
FirmwareInfo *firmware = GetCurrentFirmware();
|
||||
if (ActiveProfile) {
|
||||
setWindowTitle(tr("companion9x - Models and Settings Editor - %1 - profile %2").arg(firmware->name).arg(ActiveProfileName));
|
||||
setWindowTitle(tr("Companion - Models and Settings Editor - %1 - profile %2").arg(firmware->name).arg(ActiveProfileName));
|
||||
} else {
|
||||
setWindowTitle(tr("companion9x - Models and Settings Editor - %1").arg(firmware->name));
|
||||
setWindowTitle(tr("Companion - Models and Settings Editor - %1").arg(firmware->name));
|
||||
}
|
||||
setUnifiedTitleAndToolBarOnMac(true);
|
||||
this->setWindowIcon(QIcon(":/icon.png"));
|
||||
|
@ -172,11 +172,11 @@ void MainWindow::displayWarnings()
|
|||
if (warnId<WARNING_ID && warnId!=0) {
|
||||
int res=0;
|
||||
if (WARNING_LEVEL>0) {
|
||||
QMessageBox::warning(this, "companion9x", WARNING);
|
||||
res = QMessageBox::question(this, "companion9x",tr("Display previous warning again at startup ?"),QMessageBox::Yes | QMessageBox::No);
|
||||
QMessageBox::warning(this, "Companion", WARNING);
|
||||
res = QMessageBox::question(this, "Companion",tr("Display previous warning again at startup ?"),QMessageBox::Yes | QMessageBox::No);
|
||||
} else {
|
||||
QMessageBox::about(this, "companion9x", WARNING);
|
||||
res = QMessageBox::question(this, "companion9x",tr("Display previous message again at startup ?"),QMessageBox::Yes | QMessageBox::No);
|
||||
QMessageBox::about(this, "Companion", WARNING);
|
||||
res = QMessageBox::question(this, "Companion",tr("Display previous message again at startup ?"),QMessageBox::Yes | QMessageBox::No);
|
||||
}
|
||||
if (res == QMessageBox::No) {
|
||||
settings.setValue("warningId", WARNING_ID);
|
||||
|
@ -249,7 +249,7 @@ void MainWindow::checkForUpdateFinished(QNetworkReply * reply)
|
|||
QString version = qba.mid(i+14, 4);
|
||||
|
||||
if (version.isNull()) {
|
||||
QMessageBox::warning(this, "companion9x", tr("Unable to check for updates."));
|
||||
QMessageBox::warning(this, "Companion", tr("Unable to check for updates."));
|
||||
return;
|
||||
}
|
||||
double vnum=version.toDouble();
|
||||
|
@ -263,7 +263,7 @@ void MainWindow::checkForUpdateFinished(QNetworkReply * reply)
|
|||
if (c9xver< vnum) {
|
||||
#if defined WIN32 || !defined __GNUC__ // || defined __APPLE__ // OSX should only notify of updates since no update packages are available.
|
||||
showcheckForUpdatesResult = false; // update is available - do not show dialog
|
||||
int ret = QMessageBox::question(this, "companion9x", tr("A new version of companion9x is available (version %1)<br>"
|
||||
int ret = QMessageBox::question(this, "Companion", tr("A new version of Companion is available (version %1)<br>"
|
||||
"Would you like to download it?").arg(version) ,
|
||||
QMessageBox::Yes | QMessageBox::No);
|
||||
|
||||
|
@ -284,21 +284,21 @@ void MainWindow::checkForUpdateFinished(QNetworkReply * reply)
|
|||
}
|
||||
}
|
||||
#else
|
||||
QMessageBox::warning(this, tr("New release available"), tr("A new release of companion is available please check the repository"));
|
||||
QMessageBox::warning(this, tr("New release available"), tr("A new release of Companion is available please check the repository"));
|
||||
#endif
|
||||
} else {
|
||||
if (showcheckForUpdatesResult && check1done && check2done)
|
||||
QMessageBox::information(this, "companion9x", tr("No updates available at this time."));
|
||||
QMessageBox::information(this, "Companion", tr("No updates available at this time."));
|
||||
}
|
||||
} else {
|
||||
if(check1done && check2done)
|
||||
QMessageBox::warning(this, "companion9x", tr("Unable to check for updates."));
|
||||
QMessageBox::warning(this, "Companion", tr("Unable to check for updates."));
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::updateDownloaded()
|
||||
{
|
||||
int ret = QMessageBox::question(this, "companion9x", tr("Would you like to launch the installer?") ,
|
||||
int ret = QMessageBox::question(this, "Companion", tr("Would you like to launch the installer?") ,
|
||||
QMessageBox::Yes | QMessageBox::No);
|
||||
if (ret == QMessageBox::Yes) {
|
||||
if(QDesktopServices::openUrl(QUrl::fromLocalFile(installer_fileName)))
|
||||
|
@ -362,7 +362,7 @@ void MainWindow::reply1Accepted()
|
|||
errormsg=tr("Compilation server too busy, try later");
|
||||
break;
|
||||
case 4:
|
||||
errormsg=tr("Compilation server requires registration, please check opentx web site");
|
||||
errormsg=tr("Compilation server requires registration, please check OpenTX web site");
|
||||
break;
|
||||
default:
|
||||
errormsg=tr("Unknown server failure, try later");
|
||||
|
@ -402,7 +402,7 @@ void MainWindow::reply1Accepted()
|
|||
errormsg=tr("Compilation server too busy, try later");
|
||||
break;
|
||||
case 4:
|
||||
errormsg=tr("Compilation server requires registration, please check opentx web site");
|
||||
errormsg=tr("Compilation server requires registration, please check OpenTX web site");
|
||||
break;
|
||||
default:
|
||||
errormsg=tr("Unknown server failure, try later");
|
||||
|
@ -433,7 +433,7 @@ void MainWindow::reply1Accepted()
|
|||
}
|
||||
settings.setValue(downloadedFW, currentFWrev);
|
||||
if (autoflash) {
|
||||
int ret = QMessageBox::question(this, "companion9x", tr("Do you want to write the firmware to the transmitter now ?"), QMessageBox::Yes | QMessageBox::No);
|
||||
int ret = QMessageBox::question(this, "Companion", tr("Do you want to write the firmware to the transmitter now ?"), QMessageBox::Yes | QMessageBox::No);
|
||||
if (ret == QMessageBox::Yes) {
|
||||
burnToFlash(downloadedFWFilename);
|
||||
}
|
||||
|
@ -470,7 +470,7 @@ void MainWindow::reply1Finished(QNetworkReply * reply)
|
|||
QString newrev=qba.mid(k).replace('"', "").trimmed();
|
||||
|
||||
if(!cres) {
|
||||
QMessageBox::warning(this, "companion9x", tr("Unable to check for updates."));
|
||||
QMessageBox::warning(this, "Companion", tr("Unable to check for updates."));
|
||||
int server = settings.value("fwserver",0).toInt();
|
||||
server++;
|
||||
settings.setValue("fwserver",server);
|
||||
|
@ -490,6 +490,7 @@ void MainWindow::reply1Finished(QNetworkReply * reply)
|
|||
showcheckForUpdatesResult = false; // update is available - do not show dialog
|
||||
QString rn = GetFirmware(fwToUpdate)->rnurl;
|
||||
QAbstractButton *rnButton;
|
||||
msgBox.setWindowTitle("Companion");
|
||||
msgBox.setInformativeText(tr("Firmware %1 does not seem to have ever been downloaded.\nVersion %2 is available.\nDo you want to download it now ?").arg(fwToUpdate).arg(NewFwRev));
|
||||
QAbstractButton *YesButton = msgBox.addButton(trUtf8("Yes"), QMessageBox::YesRole);
|
||||
msgBox.addButton(trUtf8("No"), QMessageBox::NoRole);
|
||||
|
@ -502,7 +503,7 @@ void MainWindow::reply1Finished(QNetworkReply * reply)
|
|||
if( msgBox.clickedButton() == rnButton ) {
|
||||
contributorsDialog *cd = new contributorsDialog(this,2,rn);
|
||||
cd->exec();
|
||||
int ret2 = QMessageBox::question(this, "companion9x", tr("Do you want to download release %1 now ?").arg(NewFwRev),
|
||||
int ret2 = QMessageBox::question(this, "Companion", tr("Do you want to download release %1 now ?").arg(NewFwRev),
|
||||
QMessageBox::Yes | QMessageBox::No);
|
||||
if (ret2 == QMessageBox::Yes) {
|
||||
download = true;
|
||||
|
@ -518,7 +519,7 @@ void MainWindow::reply1Finished(QNetworkReply * reply)
|
|||
showcheckForUpdatesResult = false; // update is available - do not show dialog
|
||||
QString rn = GetFirmware(fwToUpdate)->rnurl;
|
||||
QAbstractButton *rnButton;
|
||||
msgBox.setText("companion9x");
|
||||
msgBox.setText("Companion");
|
||||
msgBox.setInformativeText(tr("A new version of %1 firmware is available (current %2 - newer %3).\nDo you want to download it now ?").arg(fwToUpdate).arg(OldFwRev).arg(NewFwRev));
|
||||
QAbstractButton *YesButton = msgBox.addButton(trUtf8("Yes"), QMessageBox::YesRole);
|
||||
msgBox.addButton(trUtf8("No"), QMessageBox::NoRole);
|
||||
|
@ -532,7 +533,7 @@ void MainWindow::reply1Finished(QNetworkReply * reply)
|
|||
warning=0;
|
||||
contributorsDialog *cd = new contributorsDialog(this,2,rn);
|
||||
cd->exec();
|
||||
int ret2 = QMessageBox::question(this, "companion9x", tr("Do you want to download release %1 now ?").arg(NewFwRev),
|
||||
int ret2 = QMessageBox::question(this, "Companion", tr("Do you want to download release %1 now ?").arg(NewFwRev),
|
||||
QMessageBox::Yes | QMessageBox::No);
|
||||
if (ret2 == QMessageBox::Yes) {
|
||||
download = true;
|
||||
|
@ -546,10 +547,10 @@ void MainWindow::reply1Finished(QNetworkReply * reply)
|
|||
}
|
||||
} else {
|
||||
if(showcheckForUpdatesResult && check1done && check2done)
|
||||
QMessageBox::information(this, "companion9x", tr("No updates available at this time."));
|
||||
QMessageBox::information(this, "Companion", tr("No updates available at this time."));
|
||||
}
|
||||
if (ignore) {
|
||||
int res = QMessageBox::question(this, "companion9x",tr("Ignore this version (r%1)?").arg(rev), QMessageBox::Yes | QMessageBox::No);
|
||||
int res = QMessageBox::question(this, "Companion",tr("Ignore this version (r%1)?").arg(rev), QMessageBox::Yes | QMessageBox::No);
|
||||
if (res==QMessageBox::Yes) {
|
||||
settings.beginGroup("FwRevisions");
|
||||
settings.setValue(fwToUpdate, NewFwRev);
|
||||
|
@ -559,7 +560,7 @@ void MainWindow::reply1Finished(QNetworkReply * reply)
|
|||
if (warning>0) {
|
||||
QString rn = GetFirmware(fwToUpdate)->rnurl;
|
||||
if (!rn.isEmpty()) {
|
||||
int ret2 = QMessageBox::warning(this, "companion9x", tr("Release notes contain very important informations. Do you want to see them now ?"), QMessageBox::Yes | QMessageBox::No);
|
||||
int ret2 = QMessageBox::warning(this, "Companion", tr("Release notes contain very important informations. Do you want to see them now ?"), QMessageBox::Yes | QMessageBox::No);
|
||||
if (ret2 == QMessageBox::Yes) {
|
||||
contributorsDialog *cd = new contributorsDialog(this,2,rn);
|
||||
cd->exec();
|
||||
|
@ -592,11 +593,11 @@ void MainWindow::reply1Finished(QNetworkReply * reply)
|
|||
}
|
||||
}
|
||||
} else {
|
||||
QMessageBox::warning(this, "companion9x", tr("Unable to check for updates."));
|
||||
QMessageBox::warning(this, "Companion", tr("Unable to check for updates."));
|
||||
}
|
||||
} else {
|
||||
if(check1done && check2done) {
|
||||
QMessageBox::warning(this, "companion9x", tr("Unable to check for updates."));
|
||||
QMessageBox::warning(this, "Companion", tr("Unable to check for updates."));
|
||||
int server = settings.value("fwserver",0).toInt();
|
||||
server++;
|
||||
settings.setValue("fwserver",server);
|
||||
|
@ -718,13 +719,13 @@ void MainWindow::loadProfile()
|
|||
settings.setValue("profileId", profnum);
|
||||
current_firmware_variant = GetFirmwareVariant(firmware_id);
|
||||
FirmwareInfo *firmware = GetCurrentFirmware();
|
||||
setWindowTitle(tr("companion9x - Models and Settings Editor - %1").arg(firmware->name));
|
||||
setWindowTitle(tr("Companion - Models and Settings Editor - %1").arg(firmware->name));
|
||||
// settings.setValue("lastDir", QFileInfo(fileName).dir().absolutePath());
|
||||
foreach (QMdiSubWindow *window, mdiArea->subWindowList()) {
|
||||
MdiChild *mdiChild = qobject_cast<MdiChild *>(window->widget());
|
||||
mdiChild->eepromInterfaceChanged();
|
||||
}
|
||||
setWindowTitle(tr("companion9x - Models and Settings Editor - %1 - profile %2").arg(firmware->name).arg(ActiveProfileName));
|
||||
setWindowTitle(tr("Companion - Models and Settings Editor - %1 - profile %2").arg(firmware->name).arg(ActiveProfileName));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -735,7 +736,7 @@ void MainWindow::unloadProfile()
|
|||
QSettings settings("companion9x", "companion9x");
|
||||
settings.setValue("ActiveProfile",0);
|
||||
FirmwareInfo *firmware = GetCurrentFirmware();
|
||||
setWindowTitle(tr("companion9x - Models and Settings Editor - %1").arg(firmware->name));
|
||||
setWindowTitle(tr("Companion - Models and Settings Editor - %1").arg(firmware->name));
|
||||
}
|
||||
|
||||
void MainWindow::preferences()
|
||||
|
@ -744,9 +745,9 @@ void MainWindow::preferences()
|
|||
pd->exec();
|
||||
FirmwareInfo *firmware = GetCurrentFirmware();
|
||||
if (ActiveProfile) {
|
||||
setWindowTitle(tr("companion9x - Models and Settings Editor - %1 - profile %2").arg(firmware->name).arg(ActiveProfileName));
|
||||
setWindowTitle(tr("Companion - Models and Settings Editor - %1 - profile %2").arg(firmware->name).arg(ActiveProfileName));
|
||||
} else {
|
||||
setWindowTitle(tr("companion9x - Models and Settings Editor - %1").arg(firmware->name));
|
||||
setWindowTitle(tr("Companion - Models and Settings Editor - %1").arg(firmware->name));
|
||||
}
|
||||
|
||||
foreach (QMdiSubWindow *window, mdiArea->subWindowList()) {
|
||||
|
@ -1082,10 +1083,10 @@ void MainWindow::burnExtenalToEEPROM()
|
|||
cd->exec();
|
||||
if (!fileName.isEmpty()) {
|
||||
settings.setValue("lastDir", QFileInfo(fileName).dir().absolutePath());
|
||||
int ret = QMessageBox::question(this, "companion9x", tr("Write Models and settings from %1 to the Tx?").arg(QFileInfo(fileName).fileName()), QMessageBox::Yes | QMessageBox::No);
|
||||
int ret = QMessageBox::question(this, "Companion", tr("Write Models and settings from %1 to the Tx?").arg(QFileInfo(fileName).fileName()), QMessageBox::Yes | QMessageBox::No);
|
||||
if (ret != QMessageBox::Yes) return;
|
||||
if (!isValidEEPROM(fileName))
|
||||
ret = QMessageBox::question(this, "companion9x", tr("The file %1\nhas not been recognized as a valid Models and Settings file\nWrite anyway ?").arg(QFileInfo(fileName).fileName()), QMessageBox::Yes | QMessageBox::No);
|
||||
ret = QMessageBox::question(this, "Companion", tr("The file %1\nhas not been recognized as a valid Models and Settings file\nWrite anyway ?").arg(QFileInfo(fileName).fileName()), QMessageBox::Yes | QMessageBox::No);
|
||||
if (ret != QMessageBox::Yes) return;
|
||||
bool backupEnable = settings.value("backupEnable", true).toBool();
|
||||
QString backupPath = settings.value("backupPath", "").toString();
|
||||
|
@ -1489,15 +1490,16 @@ void MainWindow::logFile()
|
|||
|
||||
void MainWindow::about()
|
||||
{
|
||||
QString aboutStr = "<center><img src=\":/images/companion9x-title.png\"><br>";
|
||||
aboutStr.append(tr("Copyright") +" Bertrand Songis & Romolo Manfredini © 2011- 2013<br>");
|
||||
aboutStr.append(QString("<a href='http://code.google.com/p/companion9x/'>http://code.google.com/p/companion9x/</a><br>")+tr("Version %1 (revision %2), %3").arg(C9X_VERSION).arg(C9X_REVISION).arg(__DATE__)+QString("<br/><br/>"));
|
||||
aboutStr.append(tr("The companion9x project was originally forked from eePe")+QString(" <a href='http://code.google.com/p/eepe'>http://code.google.com/p/eepe</a><br/><br/>"));
|
||||
QString aboutStr = "<center><img src=\":/images/companion-title.png\"></center><br>";
|
||||
aboutStr.append("OpenTX Home Page: <a href='http://opentx.github.io'>http://open-tx.org</a><br><br>");
|
||||
aboutStr.append(tr("The Companion project was originally forked from eePe")+QString(" <a href='http://code.google.com/p/eepe'>http://code.google.com/p/eepe</a><br/><br/>"));
|
||||
aboutStr.append(tr("If you've found this program useful, please support by"));
|
||||
aboutStr.append(" <a href='" DONATE_STR "'>");
|
||||
aboutStr.append(tr("donating") + "</a></center>");
|
||||
aboutStr.append(tr("donating") + "</a><br><br>");
|
||||
aboutStr.append(tr("Version %1 (revision %2), %3").arg(C9X_VERSION).arg(C9X_REVISION).arg(__DATE__)+QString("<br/><br/>"));
|
||||
aboutStr.append(tr("Copyright") +" Bertrand Songis & Romolo Manfredini © 2011- 2014<br>");
|
||||
|
||||
QMessageBox::about(this, tr("About companion9x"),aboutStr);
|
||||
QMessageBox::about(this, tr("About Companion"),aboutStr);
|
||||
}
|
||||
|
||||
void MainWindow::updateMenus()
|
||||
|
@ -1624,15 +1626,15 @@ void MainWindow::createActions()
|
|||
connect(preferencesAct, SIGNAL(triggered()), this, SLOT(preferences()));
|
||||
|
||||
checkForUpdatesAct = new QAction(QIcon(":/images/update.png"), tr("&Check for updates..."), this);
|
||||
checkForUpdatesAct->setStatusTip(tr("Check for new version of companion9x/er9x"));
|
||||
checkForUpdatesAct->setStatusTip(tr("Check for new version of Companion"));
|
||||
connect(checkForUpdatesAct, SIGNAL(triggered()), this, SLOT(doUpdates()));
|
||||
|
||||
contributorsAct = new QAction(QIcon(":/images/contributors.png"), tr("Contributors &List..."), this);
|
||||
contributorsAct->setStatusTip(tr("Show companion9x contributors list"));
|
||||
contributorsAct->setStatusTip(tr("Show Companion contributors list"));
|
||||
connect(contributorsAct, SIGNAL(triggered()), this, SLOT(contributors()));
|
||||
|
||||
changelogAct = new QAction(QIcon(":/images/changelog.png"), tr("ChangeLog..."), this);
|
||||
changelogAct->setStatusTip(tr("Show companion9x changelog"));
|
||||
changelogAct->setStatusTip(tr("Show Companion changelog"));
|
||||
connect(changelogAct, SIGNAL(triggered()), this, SLOT(changelog()));
|
||||
|
||||
fwchangelogAct = new QAction(QIcon(":/images/changelog.png"), tr("Firmware ChangeLog..."), this);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue