[companion] Replace voice download by SD download, new URL for 2.2 (sd-22.open-tx.org, needs to be created)

This commit is contained in:
Andre Bernet
2017-03-20 10:24:43 +01:00
parent fab3b96815
commit 22217e8e22
3 changed files with 63 additions and 96 deletions
+3 -9
View File
@@ -34,12 +34,6 @@ FirmwarePreferencesDialog::FirmwarePreferencesDialog(QWidget *parent) :
ui->setupUi(this);
setWindowIcon(CompanionIcon("fwpreferences.png"));
initSettings();
foreach(const char *lang, getCurrentFirmware()->getFirmwareBase()->ttslanguages) {
ui->voiceCombo->addItem(lang);
if (current_firmware_variant->getId().contains(QString("-tts%1").arg(lang)))
ui->voiceCombo->setCurrentIndex(ui->voiceCombo->count() - 1);
}
}
FirmwarePreferencesDialog::~FirmwarePreferencesDialog()
@@ -70,13 +64,13 @@ void FirmwarePreferencesDialog::on_fw_dnld_clicked()
initSettings();
}
void FirmwarePreferencesDialog::on_voice_dnld_clicked()
void FirmwarePreferencesDialog::on_sd_dnld_clicked()
{
QString url = "http://voices-21.open-tx.org/";
QString url = "http://sd-22.open-tx.org/";
QString fwType = g.profile[g.id()].fwType();
QStringList list = fwType.split("-");
QString firmware = QString("%1-%2").arg(list[0]).arg(list[1]);
url.append(QString("%1/%2/").arg(firmware).arg(ui->voiceCombo->currentText().toLower()));
url.append(QString("%1/").arg(firmware));
QDesktopServices::openUrl(url);
}