diff options
author | Dominik Wenger <domonoky@googlemail.com> | 2008-04-01 18:02:56 +0000 |
---|---|---|
committer | Dominik Wenger <domonoky@googlemail.com> | 2008-04-01 18:02:56 +0000 |
commit | 2016ab4c96f920efbeecf85dc1dfe188b9356c16 (patch) | |
tree | 4ed70664cc9b1481c9e5de1cf50acb0f6328c133 /rbutil/rbutilqt | |
parent | e249ecc85b30687764289a500c92d32dd2d10b0a (diff) | |
download | rockbox-2016ab4c96f920efbeecf85dc1dfe188b9356c16.tar.gz rockbox-2016ab4c96f920efbeecf85dc1dfe188b9356c16.zip |
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
Diffstat (limited to 'rbutil/rbutilqt')
-rw-r--r-- | rbutil/rbutilqt/installbootloader.cpp | 22 | ||||
-rw-r--r-- | rbutil/rbutilqt/installthemes.cpp | 2 | ||||
-rw-r--r-- | rbutil/rbutilqt/installzip.cpp | 5 | ||||
-rw-r--r-- | rbutil/rbutilqt/rbutilqt.cpp | 20 | ||||
-rw-r--r-- | rbutil/rbutilqt/rbutilqt.h | 1 | ||||
-rw-r--r-- | rbutil/rbutilqt/voicefile.cpp | 5 |
6 files changed, 39 insertions, 16 deletions
diff --git a/rbutil/rbutilqt/installbootloader.cpp b/rbutil/rbutilqt/installbootloader.cpp index c567dcd418..05b7be4e49 100644 --- a/rbutil/rbutilqt/installbootloader.cpp +++ b/rbutil/rbutilqt/installbootloader.cpp | |||
@@ -320,11 +320,12 @@ void BootloaderInstaller::gigabeatPrepare() | |||
320 | // get the real file. | 320 | // get the real file. |
321 | getter = new HttpGet(this); | 321 | getter = new HttpGet(this); |
322 | getter->setFile(&downloadFile); | 322 | getter->setFile(&downloadFile); |
323 | getter->getFile(QUrl(url)); | ||
324 | // connect signals from HttpGet | 323 | // connect signals from HttpGet |
325 | connect(getter, SIGNAL(done(bool)), this, SLOT(downloadDone(bool))); | 324 | connect(getter, SIGNAL(done(bool)), this, SLOT(downloadDone(bool))); |
326 | connect(getter, SIGNAL(dataReadProgress(int, int)), this, SLOT(updateDataReadProgress(int, int))); | 325 | connect(getter, SIGNAL(dataReadProgress(int, int)), this, SLOT(updateDataReadProgress(int, int))); |
327 | connect(m_dp, SIGNAL(aborted()), getter, SLOT(abort())); | 326 | connect(m_dp, SIGNAL(aborted()), getter, SLOT(abort())); |
327 | |||
328 | getter->getFile(QUrl(url)); | ||
328 | } | 329 | } |
329 | else //UnInstallation | 330 | else //UnInstallation |
330 | { | 331 | { |
@@ -518,11 +519,12 @@ void BootloaderInstaller::h10Prepare() | |||
518 | // get the real file. | 519 | // get the real file. |
519 | getter = new HttpGet(this); | 520 | getter = new HttpGet(this); |
520 | getter->setFile(&downloadFile); | 521 | getter->setFile(&downloadFile); |
521 | getter->getFile(QUrl(url)); | ||
522 | // connect signals from HttpGet | 522 | // connect signals from HttpGet |
523 | connect(getter, SIGNAL(done(bool)), this, SLOT(downloadDone(bool))); | 523 | connect(getter, SIGNAL(done(bool)), this, SLOT(downloadDone(bool))); |
524 | connect(getter, SIGNAL(dataReadProgress(int, int)), this, SLOT(updateDataReadProgress(int, int))); | 524 | connect(getter, SIGNAL(dataReadProgress(int, int)), this, SLOT(updateDataReadProgress(int, int))); |
525 | connect(m_dp, SIGNAL(aborted()), getter, SLOT(abort())); | 525 | connect(m_dp, SIGNAL(aborted()), getter, SLOT(abort())); |
526 | |||
527 | getter->getFile(QUrl(url)); | ||
526 | } | 528 | } |
527 | else // Uninstallation | 529 | else // Uninstallation |
528 | { | 530 | { |
@@ -670,11 +672,13 @@ void BootloaderInstaller::mrobe100Prepare() | |||
670 | // get the real file. | 672 | // get the real file. |
671 | getter = new HttpGet(this); | 673 | getter = new HttpGet(this); |
672 | getter->setFile(&downloadFile); | 674 | getter->setFile(&downloadFile); |
673 | getter->getFile(QUrl(url)); | 675 | |
674 | // connect signals from HttpGet | 676 | // connect signals from HttpGet |
675 | connect(getter, SIGNAL(done(bool)), this, SLOT(downloadDone(bool))); | 677 | connect(getter, SIGNAL(done(bool)), this, SLOT(downloadDone(bool))); |
676 | connect(getter, SIGNAL(dataReadProgress(int, int)), this, SLOT(updateDataReadProgress(int, int))); | 678 | connect(getter, SIGNAL(dataReadProgress(int, int)), this, SLOT(updateDataReadProgress(int, int))); |
677 | connect(m_dp, SIGNAL(aborted()), getter, SLOT(abort())); | 679 | connect(m_dp, SIGNAL(aborted()), getter, SLOT(abort())); |
680 | |||
681 | getter->getFile(QUrl(url)); | ||
678 | } | 682 | } |
679 | else // Uninstallation | 683 | else // Uninstallation |
680 | { | 684 | { |
@@ -835,11 +839,13 @@ void BootloaderInstaller::ipodPrepare() | |||
835 | // get the real file. | 839 | // get the real file. |
836 | getter = new HttpGet(this); | 840 | getter = new HttpGet(this); |
837 | getter->setFile(&downloadFile); | 841 | getter->setFile(&downloadFile); |
838 | getter->getFile(QUrl(url)); | 842 | |
839 | // connect signals from HttpGet | 843 | // connect signals from HttpGet |
840 | connect(getter, SIGNAL(done(bool)), this, SLOT(downloadDone(bool))); | 844 | connect(getter, SIGNAL(done(bool)), this, SLOT(downloadDone(bool))); |
841 | connect(getter, SIGNAL(dataReadProgress(int, int)), this, SLOT(updateDataReadProgress(int, int))); | 845 | connect(getter, SIGNAL(dataReadProgress(int, int)), this, SLOT(updateDataReadProgress(int, int))); |
842 | connect(m_dp, SIGNAL(aborted()), getter, SLOT(abort())); | 846 | connect(m_dp, SIGNAL(aborted()), getter, SLOT(abort())); |
847 | |||
848 | getter->getFile(QUrl(url)); | ||
843 | } | 849 | } |
844 | else // Uninstallation | 850 | else // Uninstallation |
845 | { | 851 | { |
@@ -1077,11 +1083,13 @@ void BootloaderInstaller::sansaPrepare() | |||
1077 | // get the real file. | 1083 | // get the real file. |
1078 | getter = new HttpGet(this); | 1084 | getter = new HttpGet(this); |
1079 | getter->setFile(&downloadFile); | 1085 | getter->setFile(&downloadFile); |
1080 | getter->getFile(QUrl(url)); | 1086 | |
1081 | // connect signals from HttpGet | 1087 | // connect signals from HttpGet |
1082 | connect(getter, SIGNAL(done(bool)), this, SLOT(downloadDone(bool))); | 1088 | connect(getter, SIGNAL(done(bool)), this, SLOT(downloadDone(bool))); |
1083 | connect(getter, SIGNAL(dataReadProgress(int, int)), this, SLOT(updateDataReadProgress(int, int))); | 1089 | connect(getter, SIGNAL(dataReadProgress(int, int)), this, SLOT(updateDataReadProgress(int, int))); |
1084 | connect(m_dp, SIGNAL(aborted()), getter, SLOT(abort())); | 1090 | connect(m_dp, SIGNAL(aborted()), getter, SLOT(abort())); |
1091 | |||
1092 | getter->getFile(QUrl(url)); | ||
1085 | } | 1093 | } |
1086 | else // Uninstallation | 1094 | else // Uninstallation |
1087 | { | 1095 | { |
@@ -1265,11 +1273,13 @@ void BootloaderInstaller::iriverPrepare() | |||
1265 | // get the real file. | 1273 | // get the real file. |
1266 | getter = new HttpGet(this); | 1274 | getter = new HttpGet(this); |
1267 | getter->setFile(&downloadFile); | 1275 | getter->setFile(&downloadFile); |
1268 | getter->getFile(QUrl(url)); | 1276 | |
1269 | // connect signals from HttpGet | 1277 | // connect signals from HttpGet |
1270 | connect(getter, SIGNAL(done(bool)), this, SLOT(downloadDone(bool))); | 1278 | connect(getter, SIGNAL(done(bool)), this, SLOT(downloadDone(bool))); |
1271 | connect(getter, SIGNAL(dataReadProgress(int, int)), this, SLOT(updateDataReadProgress(int, int))); | 1279 | connect(getter, SIGNAL(dataReadProgress(int, int)), this, SLOT(updateDataReadProgress(int, int))); |
1272 | connect(m_dp, SIGNAL(aborted()), getter, SLOT(abort())); | 1280 | connect(m_dp, SIGNAL(aborted()), getter, SLOT(abort())); |
1281 | |||
1282 | getter->getFile(QUrl(url)); | ||
1273 | } | 1283 | } |
1274 | 1284 | ||
1275 | void BootloaderInstaller::iriverFinish() | 1285 | void BootloaderInstaller::iriverFinish() |
diff --git a/rbutil/rbutilqt/installthemes.cpp b/rbutil/rbutilqt/installthemes.cpp index 37e2d9ebd7..2d0b1dfcd5 100644 --- a/rbutil/rbutilqt/installthemes.cpp +++ b/rbutil/rbutilqt/installthemes.cpp | |||
@@ -183,8 +183,8 @@ void ThemesInstallWindow::updateDetails(int row) | |||
183 | } | 183 | } |
184 | igetter.setCache(infocachedir); | 184 | igetter.setCache(infocachedir); |
185 | } | 185 | } |
186 | igetter.getFile(img); | ||
187 | connect(&igetter, SIGNAL(done(bool)), this, SLOT(updateImage(bool))); | 186 | connect(&igetter, SIGNAL(done(bool)), this, SLOT(updateImage(bool))); |
187 | igetter.getFile(img); | ||
188 | } | 188 | } |
189 | 189 | ||
190 | 190 | ||
diff --git a/rbutil/rbutilqt/installzip.cpp b/rbutil/rbutilqt/installzip.cpp index 3948e7ea75..880082a86d 100644 --- a/rbutil/rbutilqt/installzip.cpp +++ b/rbutil/rbutilqt/installzip.cpp | |||
@@ -90,11 +90,12 @@ void ZipInstaller::installStart() | |||
90 | getter->setCache(true); | 90 | getter->setCache(true); |
91 | } | 91 | } |
92 | getter->setFile(downloadFile); | 92 | getter->setFile(downloadFile); |
93 | getter->getFile(QUrl(m_url)); | 93 | |
94 | |||
95 | connect(getter, SIGNAL(done(bool)), this, SLOT(downloadDone(bool))); | 94 | connect(getter, SIGNAL(done(bool)), this, SLOT(downloadDone(bool))); |
96 | connect(getter, SIGNAL(dataReadProgress(int, int)), this, SLOT(updateDataReadProgress(int, int))); | 95 | connect(getter, SIGNAL(dataReadProgress(int, int)), this, SLOT(updateDataReadProgress(int, int))); |
97 | connect(m_dp, SIGNAL(aborted()), getter, SLOT(abort())); | 96 | connect(m_dp, SIGNAL(aborted()), getter, SLOT(abort())); |
97 | |||
98 | getter->getFile(QUrl(m_url)); | ||
98 | } | 99 | } |
99 | 100 | ||
100 | 101 | ||
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) | |||
55 | settings = new RbSettings(); | 55 | settings = new RbSettings(); |
56 | settings->open(); | 56 | settings->open(); |
57 | 57 | ||
58 | m_gotInfo = false; | ||
59 | |||
58 | // manual tab | 60 | // manual tab |
59 | updateSettings(); | 61 | updateSettings(); |
60 | ui.radioPdf->setChecked(true); | 62 | ui.radioPdf->setChecked(true); |
@@ -186,6 +188,8 @@ void RbUtilQt::downloadBleedingDone(bool error) | |||
186 | versmap.insert("bleed_rev", info.value("bleeding/rev").toString()); | 188 | versmap.insert("bleed_rev", info.value("bleeding/rev").toString()); |
187 | versmap.insert("bleed_date", info.value("bleeding/timestamp").toString()); | 189 | versmap.insert("bleed_date", info.value("bleeding/timestamp").toString()); |
188 | qDebug() << "versmap =" << versmap; | 190 | qDebug() << "versmap =" << versmap; |
191 | |||
192 | m_gotInfo = true; | ||
189 | } | 193 | } |
190 | 194 | ||
191 | 195 | ||
@@ -624,6 +628,14 @@ void RbUtilQt::installFonts() | |||
624 | void RbUtilQt::installVoice() | 628 | void RbUtilQt::installVoice() |
625 | { | 629 | { |
626 | if(chkConfig(true)) return; | 630 | if(chkConfig(true)) return; |
631 | |||
632 | if(m_gotInfo == false) | ||
633 | { | ||
634 | QMessageBox::warning(this, tr("Warning"), | ||
635 | tr("The Application is still downloading Information about new Builds. Please try again shortly.")); | ||
636 | return; | ||
637 | } | ||
638 | |||
627 | if(QMessageBox::question(this, tr("Confirm Installation"), | 639 | if(QMessageBox::question(this, tr("Confirm Installation"), |
628 | tr("Do you really want to install the voice file?"), | 640 | tr("Do you really want to install the voice file?"), |
629 | QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) return; | 641 | QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) return; |
@@ -633,19 +645,17 @@ void RbUtilQt::installVoice() | |||
633 | 645 | ||
634 | // create zip installer | 646 | // create zip installer |
635 | installer = new ZipInstaller(this); | 647 | installer = new ZipInstaller(this); |
636 | installer->setUnzip(false); | 648 | |
637 | 649 | QString voiceurl = settings->voiceUrl(); | |
638 | QString voiceurl = settings->voiceUrl() + "/" ; | ||
639 | 650 | ||
640 | voiceurl += settings->curVoiceName() + "-" + | 651 | voiceurl += settings->curVoiceName() + "-" + |
641 | versmap.value("arch_date") + "-english.voice"; | 652 | versmap.value("arch_date") + "-english.zip"; |
642 | qDebug() << voiceurl; | 653 | qDebug() << voiceurl; |
643 | 654 | ||
644 | installer->setUrl(voiceurl); | 655 | installer->setUrl(voiceurl); |
645 | installer->setLogSection("Voice"); | 656 | installer->setLogSection("Voice"); |
646 | installer->setLogVersion(versmap.value("arch_date")); | 657 | installer->setLogVersion(versmap.value("arch_date")); |
647 | installer->setMountPoint(settings->mountpoint()); | 658 | installer->setMountPoint(settings->mountpoint()); |
648 | installer->setTarget("/.rockbox/langs/english.voice"); | ||
649 | if(!settings->cacheDisabled()) | 659 | if(!settings->cacheDisabled()) |
650 | installer->setCache(true); | 660 | installer->setCache(true); |
651 | installer->install(logger); | 661 | installer->install(logger); |
diff --git a/rbutil/rbutilqt/rbutilqt.h b/rbutil/rbutilqt/rbutilqt.h index 35dbf0f30e..76d05c1175 100644 --- a/rbutil/rbutilqt/rbutilqt.h +++ b/rbutil/rbutilqt/rbutilqt.h | |||
@@ -61,6 +61,7 @@ class RbUtilQt : public QMainWindow | |||
61 | 61 | ||
62 | volatile bool m_installed; | 62 | volatile bool m_installed; |
63 | volatile bool m_error; | 63 | volatile bool m_error; |
64 | bool m_gotInfo; | ||
64 | 65 | ||
65 | private slots: | 66 | private slots: |
66 | void about(void); | 67 | void about(void); |
diff --git a/rbutil/rbutilqt/voicefile.cpp b/rbutil/rbutilqt/voicefile.cpp index 08b39fdfef..f949839cf1 100644 --- a/rbutil/rbutilqt/voicefile.cpp +++ b/rbutil/rbutilqt/voicefile.cpp | |||
@@ -91,11 +91,12 @@ bool VoiceFileCreator::createVoiceFile(ProgressloggerInterface* logger) | |||
91 | // get the real file. | 91 | // get the real file. |
92 | getter = new HttpGet(this); | 92 | getter = new HttpGet(this); |
93 | getter->setFile(downloadFile); | 93 | getter->setFile(downloadFile); |
94 | getter->getFile(genlangUrl); | 94 | |
95 | |||
96 | connect(getter, SIGNAL(done(bool)), this, SLOT(downloadDone(bool))); | 95 | connect(getter, SIGNAL(done(bool)), this, SLOT(downloadDone(bool))); |
97 | connect(getter, SIGNAL(dataReadProgress(int, int)), this, SLOT(updateDataReadProgress(int, int))); | 96 | connect(getter, SIGNAL(dataReadProgress(int, int)), this, SLOT(updateDataReadProgress(int, int))); |
98 | connect(m_logger, SIGNAL(aborted()), getter, SLOT(abort())); | 97 | connect(m_logger, SIGNAL(aborted()), getter, SLOT(abort())); |
98 | |||
99 | getter->getFile(genlangUrl); | ||
99 | return true; | 100 | return true; |
100 | } | 101 | } |
101 | 102 | ||