From 2016ab4c96f920efbeecf85dc1dfe188b9356c16 Mon Sep 17 00:00:00 2001 From: Dominik Wenger Date: Tue, 1 Apr 2008 18:02:56 +0000 Subject: rbutil: let rbutil use the new voice.zip files. Also make the download cache working again. (make sure to connect signals before calling getFile() ). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16917 a1c6a512-1295-4272-9138-f99709370657 --- rbutil/rbutilqt/rbutilqt.cpp | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'rbutil/rbutilqt/rbutilqt.cpp') diff --git a/rbutil/rbutilqt/rbutilqt.cpp b/rbutil/rbutilqt/rbutilqt.cpp index 041fafdd60..71415d70eb 100644 --- a/rbutil/rbutilqt/rbutilqt.cpp +++ b/rbutil/rbutilqt/rbutilqt.cpp @@ -55,6 +55,8 @@ RbUtilQt::RbUtilQt(QWidget *parent) : QMainWindow(parent) settings = new RbSettings(); settings->open(); + m_gotInfo = false; + // manual tab updateSettings(); ui.radioPdf->setChecked(true); @@ -186,6 +188,8 @@ void RbUtilQt::downloadBleedingDone(bool error) versmap.insert("bleed_rev", info.value("bleeding/rev").toString()); versmap.insert("bleed_date", info.value("bleeding/timestamp").toString()); qDebug() << "versmap =" << versmap; + + m_gotInfo = true; } @@ -624,6 +628,14 @@ void RbUtilQt::installFonts() void RbUtilQt::installVoice() { if(chkConfig(true)) 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; + } + if(QMessageBox::question(this, tr("Confirm Installation"), tr("Do you really want to install the voice file?"), QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) return; @@ -633,19 +645,17 @@ void RbUtilQt::installVoice() // create zip installer installer = new ZipInstaller(this); - installer->setUnzip(false); - - QString voiceurl = settings->voiceUrl() + "/" ; + + QString voiceurl = settings->voiceUrl(); voiceurl += settings->curVoiceName() + "-" + - versmap.value("arch_date") + "-english.voice"; + versmap.value("arch_date") + "-english.zip"; qDebug() << voiceurl; installer->setUrl(voiceurl); installer->setLogSection("Voice"); installer->setLogVersion(versmap.value("arch_date")); installer->setMountPoint(settings->mountpoint()); - installer->setTarget("/.rockbox/langs/english.voice"); if(!settings->cacheDisabled()) installer->setCache(true); installer->install(logger); -- cgit v1.2.3