From 0ea8f074ed5bc615f5a7cc495582f525210b87d5 Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Sun, 22 Nov 2020 16:02:11 +0100 Subject: rbutil: Remove Install Voice button from Accessibility tab. Installing the voice file is now done via the main installation. Change-Id: I431744467faaf1720b3c82d339a424d67c84e6e6 --- rbutil/rbutilqt/rbutilqt.cpp | 76 ------------------------------------------ rbutil/rbutilqt/rbutilqt.h | 1 - rbutil/rbutilqt/rbutilqtfrm.ui | 41 ++++------------------- 3 files changed, 6 insertions(+), 112 deletions(-) diff --git a/rbutil/rbutilqt/rbutilqt.cpp b/rbutil/rbutilqt/rbutilqt.cpp index a250e4f252..4953db3470 100644 --- a/rbutil/rbutilqt/rbutilqt.cpp +++ b/rbutil/rbutilqt/rbutilqt.cpp @@ -158,13 +158,11 @@ RbUtilQt::RbUtilQt(QWidget *parent) : QMainWindow(parent) connect(ui.buttonEject, SIGNAL(clicked()), this, SLOT(eject())); connect(ui.buttonTalk, SIGNAL(clicked()), this, SLOT(createTalkFiles())); connect(ui.buttonCreateVoice, SIGNAL(clicked()), this, SLOT(createVoiceFile())); - connect(ui.buttonVoice, SIGNAL(clicked()), this, SLOT(installVoice())); connect(ui.buttonRemoveRockbox, SIGNAL(clicked()), this, SLOT(uninstall())); connect(ui.buttonRemoveBootloader, SIGNAL(clicked()), this, SLOT(uninstallBootloader())); connect(ui.buttonBackup, SIGNAL(clicked()), this, SLOT(backup())); // actions accessible from the menu - connect(ui.actionInstall_Voice_File, SIGNAL(triggered()), this, SLOT(installVoice())); connect(ui.actionCreate_Voice_File, SIGNAL(triggered()), this, SLOT(createVoiceFile())); connect(ui.actionCreate_Talk_Files, SIGNAL(triggered()), this, SLOT(createTalkFiles())); connect(ui.actionRemove_bootloader, SIGNAL(triggered()), this, SLOT(uninstallBootloader())); @@ -438,80 +436,6 @@ void RbUtilQt::installdone(bool error) m_error = error; } -void RbUtilQt::installVoice() -{ - if(chkConfig(this)) return; - - if(m_gotInfo == false) - { - QMessageBox::warning(this, tr("Warning"), - tr("The Application is still downloading Information about new Builds." - " Please try again shortly.")); - return; - } - - QString mountpoint = RbSettings::value(RbSettings::Mountpoint).toString(); - RockboxInfo installInfo(mountpoint); - - QString voiceurl; - QString logversion; - QString relversion = installInfo.release(); - // if no version is found abort. - if(installInfo.revision().isEmpty() && relversion.isEmpty()) { - QMessageBox::critical(this, tr("No Rockbox installation found"), - tr("Could not determine the installed Rockbox version. " - "Please install a Rockbox build before installing " - "voice files.")); - return; - } - if(relversion.isEmpty()) { - // release is empty for development builds. - // No voice files are available for development builds. - QMessageBox::critical(this, tr("No voice file available"), - tr("The installed version of Rockbox is a development version. " - "Pre-built voices are only available for release versions " - "of Rockbox. Please generate a voice yourself using the " - "\"Create voice file\" functionality.")); - return; - } - else { - voiceurl = SystemInfo::value(SystemInfo::VoiceUrl, - SystemInfo::BuildRelease).toString(); - logversion = installInfo.release(); - } - if(QMessageBox::question(this, tr("Confirm Installation"), - tr("Do you really want to install the voice file?"), - QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) - return; - - QString model = SystemInfo::platformValue(SystemInfo::BuildserverModel).toString(); - // replace placeholder in voice url - voiceurl.replace("%MODEL%", model); - voiceurl.replace("%RELVERSION%", relversion); - voiceurl.replace("%LANGUAGE%", "english"); - - LOG_INFO() << "voicefile URL:" << voiceurl; - - // create logger - logger = new ProgressLoggerGui(this); - logger->show(); - // create zip installer - installer = new ZipInstaller(this); - - installer->setUrl(voiceurl); - installer->setLogSection("Voice"); - installer->setLogVersion(logversion); - installer->setMountPoint(mountpoint); - if(!RbSettings::value(RbSettings::CacheDisabled).toBool()) - installer->setCache(true); - connect(installer, SIGNAL(logItem(QString, int)), logger, SLOT(addItem(QString, int))); - connect(installer, SIGNAL(logProgress(int, int)), logger, SLOT(setProgress(int, int))); - connect(installer, SIGNAL(done(bool)), logger, SLOT(setFinished())); - connect(logger, SIGNAL(aborted()), installer, SLOT(abort())); - installer->install(); - -} - void RbUtilQt::createTalkFiles(void) { diff --git a/rbutil/rbutilqt/rbutilqt.h b/rbutil/rbutilqt/rbutilqt.h index 41000b80f9..e20749d438 100644 --- a/rbutil/rbutilqt/rbutilqt.h +++ b/rbutil/rbutilqt/rbutilqt.h @@ -91,7 +91,6 @@ class RbUtilQt : public QMainWindow void downloadInfo(void); void backup(void); - void installVoice(void); void uninstall(void); void uninstallBootloader(void); void installPortable(void); diff --git a/rbutil/rbutilqt/rbutilqtfrm.ui b/rbutil/rbutilqt/rbutilqtfrm.ui index f0b18ea87a..4bdd929a93 100644 --- a/rbutil/rbutilqt/rbutilqtfrm.ui +++ b/rbutil/rbutilqt/rbutilqtfrm.ui @@ -171,34 +171,7 @@ Install accessibility add-ons - - - - Install Voice files - - - - :/icons/audio-volume-high.svg:/icons/audio-volume-high.svg - - - - 56 - 46 - - - - - - - - <b>Install Voice file</b><br/>Voice files are needed to make Rockbox speak the user interface. Speaking is enabled by default, so if you installed the voice file Rockbox will speak. - - - true - - - - + Install Talk files @@ -215,14 +188,14 @@ - + <b>Create Talk Files</b><br/>Talkfiles are needed to let Rockbox speak File and Foldernames - + Qt::Vertical @@ -235,7 +208,7 @@ - + Qt::Vertical @@ -248,7 +221,7 @@ - + Create Voice files @@ -265,7 +238,7 @@ - + <b>Create Voice file</b><br/>Voice files are needed to make Rockbox speak the user interface. Speaking is enabled by default, so @@ -436,7 +409,6 @@ &Accessibility - @@ -656,7 +628,6 @@ buttonChangeDevice buttonRemoveBootloader buttonRemoveRockbox - buttonVoice buttonCreateVoice buttonTalk -- cgit v1.2.3