From 22217e8e222afa436daa54d48ec370a2bf8d7fc1 Mon Sep 17 00:00:00 2001 From: Andre Bernet Date: Mon, 20 Mar 2017 10:24:43 +0100 Subject: [PATCH] [companion] Replace voice download by SD download, new URL for 2.2 (sd-22.open-tx.org, needs to be created) --- companion/src/fwpreferencesdialog.cpp | 12 +-- companion/src/fwpreferencesdialog.h | 2 +- companion/src/fwpreferencesdialog.ui | 145 +++++++++++--------------- 3 files changed, 63 insertions(+), 96 deletions(-) diff --git a/companion/src/fwpreferencesdialog.cpp b/companion/src/fwpreferencesdialog.cpp index 5d7a67d15..651ef06c5 100644 --- a/companion/src/fwpreferencesdialog.cpp +++ b/companion/src/fwpreferencesdialog.cpp @@ -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); } diff --git a/companion/src/fwpreferencesdialog.h b/companion/src/fwpreferencesdialog.h index 70fcd439b..16ab5823f 100644 --- a/companion/src/fwpreferencesdialog.h +++ b/companion/src/fwpreferencesdialog.h @@ -45,7 +45,7 @@ class FirmwarePreferencesDialog : public QDialog private slots: void on_fw_dnld_clicked(); - void on_voice_dnld_clicked(); + void on_sd_dnld_clicked(); void on_checkFWUpdates_clicked(); }; diff --git a/companion/src/fwpreferencesdialog.ui b/companion/src/fwpreferencesdialog.ui index 0f21b6592..b8b7935f2 100644 --- a/companion/src/fwpreferencesdialog.ui +++ b/companion/src/fwpreferencesdialog.ui @@ -26,13 +26,22 @@ Downloads + + 6 + + + 6 + + + 6 + + + 6 + 2 - - 6 - - + Qt::Horizontal @@ -42,7 +51,7 @@ - + @@ -55,75 +64,6 @@ - - - - - Sans Serif - 75 - true - - - - Voice - - - - - - - - 50 - 16777215 - - - - Set voice language. -May be different from firmware language - - - - - - - Download Voice - - - - - - - Download FW - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::Horizontal - - - - - - - Qt::Horizontal - - - @@ -147,20 +87,28 @@ May be different from firmware language - - - - - 0 - 0 - - + + - FwType + Download FW - + + + + Qt::Horizontal + + + + + + + Download SD contents + + + + - @@ -174,13 +122,38 @@ May be different from firmware language + + + + + 0 + 0 + + + + FwType + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + checkFWUpdates fw_dnld - voiceCombo - voice_dnld + sd_dnld buttonBox