1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-24 00:35:18 +03:00
This commit is contained in:
Bertrand Songis 2015-08-16 21:14:56 +02:00
parent 23c985ffd6
commit f5f1a052ca
7 changed files with 148 additions and 122 deletions

View file

@ -667,41 +667,47 @@ void MainWindow::contributors()
void MainWindow::sdsync()
{
QString sdPath = g.profile[g.id()].sdPath();
if (sdPath.isEmpty()) {
QMessageBox::warning(this, QObject::tr("Synchronization error"), QObject::tr("No SD directory configured!"));
return;
}
QString massstoragePath = findMassstoragePath("SOUNDS");
if (massstoragePath.isEmpty()) {
QMessageBox::warning(this, QObject::tr("Synchronization error"), QObject::tr("No Radio connected!"));
return;
}
massstoragePath += "/..";
massstoragePath = massstoragePath.left(massstoragePath.length() - 7);
ProgressDialog progressDialog(this, tr("Synchronize SD"), CompanionIcon("sdsync.png"));
SyncProcess syncProcess(massstoragePath, g.profile[g.id()].sdPath(), progressDialog.progress());
syncProcess.run();
progressDialog.exec();
if (!syncProcess.run()) {
progressDialog.exec();
}
}
void MainWindow::changelog()
{
ReleaseNotesDialog * dialog = new ReleaseNotesDialog(this);
dialog->exec();
ReleaseNotesDialog * dialog = new ReleaseNotesDialog(this);
dialog->exec();
}
void MainWindow::fwchangelog()
{
Firmware *currfirm = GetCurrentFirmware();
QString rn=currfirm->getReleaseNotesUrl();
if (rn.isEmpty()) {
QMessageBox::information(this, tr("Firmware updates"), tr("Current firmware does not provide release notes informations."));
}
else {
ReleaseNotesFirmwareDialog * dialog = new ReleaseNotesFirmwareDialog(this, rn);
dialog->exec();
}
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."));
}
else {
ReleaseNotesFirmwareDialog * dialog = new ReleaseNotesFirmwareDialog(this, url);
dialog->exec();
}
}
void MainWindow::customizeSplash()
{
customizeSplashDialog *cd = new customizeSplashDialog(this);
cd->exec();
customizeSplashDialog * dialog = new customizeSplashDialog(this);
dialog->exec();
}
void MainWindow::cut()