diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2020-11-21 22:10:57 +0100 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2020-11-22 14:43:01 +0100 |
commit | 1a3d12ceeab77ee38f202c410b774f7d2e247ea4 (patch) | |
tree | 73aefe584755b1672b7b9d3feea05e5346430201 /rbutil | |
parent | 0d2257d1f79e6c863e77dd93d8abae7d627062ad (diff) | |
download | rockbox-1a3d12ceeab77ee38f202c410b774f7d2e247ea4.tar.gz rockbox-1a3d12ceeab77ee38f202c410b774f7d2e247ea4.zip |
rbutil: Don't try to install voice file if it's not available.
Change-Id: I42f70d6cf76298216bb626fd0fe760c0ce0a9835
Diffstat (limited to 'rbutil')
-rw-r--r-- | rbutil/rbutilqt/gui/selectiveinstallwidget.cpp | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/rbutil/rbutilqt/gui/selectiveinstallwidget.cpp b/rbutil/rbutilqt/gui/selectiveinstallwidget.cpp index 4dc6b37eab..1d7439e6fc 100644 --- a/rbutil/rbutilqt/gui/selectiveinstallwidget.cpp +++ b/rbutil/rbutilqt/gui/selectiveinstallwidget.cpp | |||
@@ -506,38 +506,38 @@ void SelectiveInstallWidget::installFonts(void) | |||
506 | 506 | ||
507 | void SelectiveInstallWidget::installVoicefile(void) | 507 | void SelectiveInstallWidget::installVoicefile(void) |
508 | { | 508 | { |
509 | if(ui.voiceCheckbox->isChecked()) { | 509 | if(ui.voiceCheckbox->isChecked() && ui.voiceCheckbox->isEnabled()) { |
510 | LOG_INFO() << "installing Voice file"; | 510 | LOG_INFO() << "installing Voice file"; |
511 | QString lang = ui.voiceCombobox->currentData().toString(); | 511 | QString lang = ui.voiceCombobox->currentData().toString(); |
512 | 512 | ||
513 | RockboxInfo installInfo(m_mountpoint); | 513 | RockboxInfo installInfo(m_mountpoint); |
514 | QString voiceurl; | 514 | QString voiceurl; |
515 | QString logversion; | 515 | QString logversion; |
516 | QString relversion = installInfo.release(); | 516 | QString relversion = installInfo.release(); |
517 | if(m_buildtype != SystemInfo::BuildRelease) { | 517 | if(m_buildtype != SystemInfo::BuildRelease) { |
518 | // release is empty for non-release versions (i.e. daily / current) | 518 | // release is empty for non-release versions (i.e. daily / current) |
519 | logversion = installInfo.release(); | 519 | logversion = installInfo.release(); |
520 | } | 520 | } |
521 | voiceurl = SystemInfo::value(SystemInfo::VoiceUrl, m_buildtype).toString(); | 521 | voiceurl = SystemInfo::value(SystemInfo::VoiceUrl, m_buildtype).toString(); |
522 | voiceurl.replace("%RELVERSION%", m_versions[m_buildtype]); | 522 | voiceurl.replace("%RELVERSION%", m_versions[m_buildtype]); |
523 | voiceurl.replace("%MODEL%", m_target); | 523 | voiceurl.replace("%MODEL%", m_target); |
524 | voiceurl.replace("%LANGUAGE%", lang); | 524 | voiceurl.replace("%LANGUAGE%", lang); |
525 | 525 | ||
526 | // create new zip installer | 526 | // create new zip installer |
527 | if(m_zipinstaller != nullptr) m_zipinstaller->deleteLater(); | 527 | if(m_zipinstaller != nullptr) m_zipinstaller->deleteLater(); |
528 | m_zipinstaller = new ZipInstaller(this); | 528 | m_zipinstaller = new ZipInstaller(this); |
529 | m_zipinstaller->setUrl(voiceurl); | 529 | m_zipinstaller->setUrl(voiceurl); |
530 | m_zipinstaller->setLogSection("Voice (" + lang + ")"); | 530 | m_zipinstaller->setLogSection("Voice (" + lang + ")"); |
531 | m_zipinstaller->setLogVersion(logversion); | 531 | m_zipinstaller->setLogVersion(logversion); |
532 | m_zipinstaller->setMountPoint(m_mountpoint); | 532 | m_zipinstaller->setMountPoint(m_mountpoint); |
533 | if(!RbSettings::value(RbSettings::CacheDisabled).toBool()) | 533 | if(!RbSettings::value(RbSettings::CacheDisabled).toBool()) |
534 | m_zipinstaller->setCache(true); | 534 | m_zipinstaller->setCache(true); |
535 | 535 | ||
536 | connect(m_zipinstaller, SIGNAL(done(bool)), this, SLOT(continueInstall(bool))); | 536 | connect(m_zipinstaller, SIGNAL(done(bool)), this, SLOT(continueInstall(bool))); |
537 | connect(m_zipinstaller, SIGNAL(logItem(QString, int)), m_logger, SLOT(addItem(QString, int))); | 537 | connect(m_zipinstaller, SIGNAL(logItem(QString, int)), m_logger, SLOT(addItem(QString, int))); |
538 | connect(m_zipinstaller, SIGNAL(logProgress(int, int)), m_logger, SLOT(setProgress(int, int))); | 538 | connect(m_zipinstaller, SIGNAL(logProgress(int, int)), m_logger, SLOT(setProgress(int, int))); |
539 | connect(m_logger, SIGNAL(aborted()), m_zipinstaller, SLOT(abort())); | 539 | connect(m_logger, SIGNAL(aborted()), m_zipinstaller, SLOT(abort())); |
540 | m_zipinstaller->install(); | 540 | m_zipinstaller->install(); |
541 | } | 541 | } |
542 | else { | 542 | else { |
543 | LOG_INFO() << "Voice install disabled."; | 543 | LOG_INFO() << "Voice install disabled."; |