diff options
-rw-r--r-- | rbutil/rbutilqt/base/uninstall.cpp | 4 | ||||
-rw-r--r-- | rbutil/rbutilqt/install.cpp | 8 | ||||
-rw-r--r-- | rbutil/rbutilqt/installtalkwindow.cpp | 2 | ||||
-rw-r--r-- | rbutil/rbutilqt/progressloggergui.cpp | 37 | ||||
-rw-r--r-- | rbutil/rbutilqt/progressloggergui.h | 4 | ||||
-rw-r--r-- | rbutil/rbutilqt/progressloggerinterface.h | 4 | ||||
-rw-r--r-- | rbutil/rbutilqt/rbutilqt.cpp | 32 | ||||
-rw-r--r-- | rbutil/rbutilqt/talkfile.cpp | 8 | ||||
-rw-r--r-- | rbutil/rbutilqt/themesinstallwindow.cpp | 10 | ||||
-rw-r--r-- | rbutil/rbutilqt/voicefile.cpp | 20 | ||||
-rw-r--r-- | rbutil/rbutilqt/zipinstaller.cpp | 14 |
11 files changed, 80 insertions, 63 deletions
diff --git a/rbutil/rbutilqt/base/uninstall.cpp b/rbutil/rbutilqt/base/uninstall.cpp index ae5ece7da5..b7a63edcd5 100644 --- a/rbutil/rbutilqt/base/uninstall.cpp +++ b/rbutil/rbutilqt/base/uninstall.cpp | |||
@@ -36,7 +36,7 @@ void Uninstaller::deleteAll(ProgressloggerInterface* dp) | |||
36 | m_dp->setProgressMax(1); | 36 | m_dp->setProgressMax(1); |
37 | m_dp->setProgressValue(1); | 37 | m_dp->setProgressValue(1); |
38 | m_dp->addItem(tr("Finished Uninstallation"),LOGOK); | 38 | m_dp->addItem(tr("Finished Uninstallation"),LOGOK); |
39 | m_dp->abort(); | 39 | m_dp->setFinished(); |
40 | } | 40 | } |
41 | 41 | ||
42 | void Uninstaller::uninstall(ProgressloggerInterface* dp) | 42 | void Uninstaller::uninstall(ProgressloggerInterface* dp) |
@@ -110,7 +110,7 @@ void Uninstaller::uninstall(ProgressloggerInterface* dp) | |||
110 | m_dp->setProgressMax(1); | 110 | m_dp->setProgressMax(1); |
111 | m_dp->setProgressValue(1); | 111 | m_dp->setProgressValue(1); |
112 | m_dp->addItem(tr("Uninstallation finished"),LOGOK); | 112 | m_dp->addItem(tr("Uninstallation finished"),LOGOK); |
113 | m_dp->abort(); | 113 | m_dp->setFinished(); |
114 | } | 114 | } |
115 | 115 | ||
116 | QStringList Uninstaller::getAllSections() | 116 | QStringList Uninstaller::getAllSections() |
diff --git a/rbutil/rbutilqt/install.cpp b/rbutil/rbutilqt/install.cpp index 2332a713c4..946c7013fa 100644 --- a/rbutil/rbutilqt/install.cpp +++ b/rbutil/rbutilqt/install.cpp | |||
@@ -96,7 +96,7 @@ void Install::accept() | |||
96 | // show dialog with error if mount point is wrong | 96 | // show dialog with error if mount point is wrong |
97 | if(!QFileInfo(mountPoint).isDir()) { | 97 | if(!QFileInfo(mountPoint).isDir()) { |
98 | logger->addItem(tr("Mount point is wrong!"),LOGERROR); | 98 | logger->addItem(tr("Mount point is wrong!"),LOGERROR); |
99 | logger->abort(); | 99 | logger->setFinished(); |
100 | return; | 100 | return; |
101 | } | 101 | } |
102 | 102 | ||
@@ -141,7 +141,7 @@ void Install::accept() | |||
141 | == QMessageBox::Abort) | 141 | == QMessageBox::Abort) |
142 | { | 142 | { |
143 | logger->addItem(tr("Aborted!"),LOGERROR); | 143 | logger->addItem(tr("Aborted!"),LOGERROR); |
144 | logger->abort(); | 144 | logger->setFinished(); |
145 | return; | 145 | return; |
146 | } | 146 | } |
147 | } | 147 | } |
@@ -170,7 +170,7 @@ void Install::accept() | |||
170 | else | 170 | else |
171 | { | 171 | { |
172 | logger->addItem(tr("Backup failed!"),LOGERROR); | 172 | logger->addItem(tr("Backup failed!"),LOGERROR); |
173 | logger->abort(); | 173 | logger->setFinished(); |
174 | return; | 174 | return; |
175 | } | 175 | } |
176 | } | 176 | } |
@@ -212,7 +212,7 @@ void Install::done(bool error) | |||
212 | 212 | ||
213 | if(error) | 213 | if(error) |
214 | { | 214 | { |
215 | logger->abort(); | 215 | logger->setFinished(); |
216 | return; | 216 | return; |
217 | } | 217 | } |
218 | 218 | ||
diff --git a/rbutil/rbutilqt/installtalkwindow.cpp b/rbutil/rbutilqt/installtalkwindow.cpp index 041b8f2885..cfe38ed2b9 100644 --- a/rbutil/rbutilqt/installtalkwindow.cpp +++ b/rbutil/rbutilqt/installtalkwindow.cpp | |||
@@ -84,7 +84,7 @@ void InstallTalkWindow::accept() | |||
84 | if(!QFileInfo(folderToTalk).isDir()) | 84 | if(!QFileInfo(folderToTalk).isDir()) |
85 | { | 85 | { |
86 | logger->addItem(tr("The Folder to Talk is wrong!"),LOGERROR); | 86 | logger->addItem(tr("The Folder to Talk is wrong!"),LOGERROR); |
87 | logger->abort(); | 87 | logger->setFinished(); |
88 | return; | 88 | return; |
89 | } | 89 | } |
90 | 90 | ||
diff --git a/rbutil/rbutilqt/progressloggergui.cpp b/rbutil/rbutilqt/progressloggergui.cpp index a96778bc11..0358d75096 100644 --- a/rbutil/rbutilqt/progressloggergui.cpp +++ b/rbutil/rbutilqt/progressloggergui.cpp | |||
@@ -25,7 +25,7 @@ ProgressLoggerGui::ProgressLoggerGui(QWidget* parent): ProgressloggerInterface(p | |||
25 | downloadProgress->setModal(true); | 25 | downloadProgress->setModal(true); |
26 | dp.setupUi(downloadProgress); | 26 | dp.setupUi(downloadProgress); |
27 | dp.listProgress->setAlternatingRowColors(true); | 27 | dp.listProgress->setAlternatingRowColors(true); |
28 | connect(dp.buttonAbort, SIGNAL(clicked()), this, SLOT(abort())); | 28 | setRunning(); |
29 | } | 29 | } |
30 | 30 | ||
31 | void ProgressLoggerGui::addItem(const QString &text) | 31 | void ProgressLoggerGui::addItem(const QString &text) |
@@ -87,22 +87,39 @@ void ProgressLoggerGui::setProgressVisible(bool b) | |||
87 | } | 87 | } |
88 | 88 | ||
89 | 89 | ||
90 | void ProgressLoggerGui::abort() | 90 | /** Set logger into "running" state -- the reporting process is still running. |
91 | * Display "Abort" and emit the aborted() signal on button press. | ||
92 | */ | ||
93 | void ProgressLoggerGui::setRunning() | ||
94 | { | ||
95 | dp.buttonAbort->setText(tr("&Abort")); | ||
96 | dp.buttonAbort->setIcon(QIcon(QString::fromUtf8(":/icons/process-stop.png"))); | ||
97 | |||
98 | // make sure to not close the window on button press. | ||
99 | disconnect(dp.buttonAbort, SIGNAL(clicked()), downloadProgress, SLOT(close())); | ||
100 | // emit aborted() once button is pressed but not closed(). | ||
101 | disconnect(dp.buttonAbort, SIGNAL(clicked()), this, SIGNAL(closed())); | ||
102 | connect(dp.buttonAbort, SIGNAL(clicked()), this, SIGNAL(aborted())); | ||
103 | |||
104 | } | ||
105 | |||
106 | |||
107 | /** Set logger into "finished" state -- the reporting process is finished. | ||
108 | * Display "Ok". Don't emit aborted() as there is nothing running left. | ||
109 | * Close logger on button press and emit closed(). | ||
110 | */ | ||
111 | void ProgressLoggerGui::setFinished() | ||
91 | { | 112 | { |
92 | dp.buttonAbort->setText(tr("&Ok")); | 113 | dp.buttonAbort->setText(tr("&Ok")); |
93 | dp.buttonAbort->setIcon(QIcon(QString::fromUtf8(":/icons/go-next.png"))); | 114 | dp.buttonAbort->setIcon(QIcon(QString::fromUtf8(":/icons/go-next.png"))); |
94 | disconnect(dp.buttonAbort, SIGNAL(clicked()), this, SLOT(abort())); | 115 | |
116 | // close the window on button press. | ||
95 | connect(dp.buttonAbort, SIGNAL(clicked()), downloadProgress, SLOT(close())); | 117 | connect(dp.buttonAbort, SIGNAL(clicked()), downloadProgress, SLOT(close())); |
118 | // emit closed() once button is pressed but not aborted(). | ||
119 | disconnect(dp.buttonAbort, SIGNAL(clicked()), this, SIGNAL(aborted())); | ||
96 | connect(dp.buttonAbort, SIGNAL(clicked()), this, SIGNAL(closed())); | 120 | connect(dp.buttonAbort, SIGNAL(clicked()), this, SIGNAL(closed())); |
97 | emit aborted(); | ||
98 | } | 121 | } |
99 | 122 | ||
100 | void ProgressLoggerGui::undoAbort() | ||
101 | { | ||
102 | dp.buttonAbort->setText(tr("&Abort")); | ||
103 | dp.buttonAbort->setIcon(QIcon(QString::fromUtf8(":/icons/process-stop.png"))); | ||
104 | connect(dp.buttonAbort, SIGNAL(clicked()), this, SLOT(abort())); | ||
105 | } | ||
106 | 123 | ||
107 | void ProgressLoggerGui::close() | 124 | void ProgressLoggerGui::close() |
108 | { | 125 | { |
diff --git a/rbutil/rbutilqt/progressloggergui.h b/rbutil/rbutilqt/progressloggergui.h index c1fdf0c7c6..c5e8c449ce 100644 --- a/rbutil/rbutilqt/progressloggergui.h +++ b/rbutil/rbutilqt/progressloggergui.h | |||
@@ -46,10 +46,10 @@ public slots: | |||
46 | virtual void addItem(const QString &text, int flag); //! add a string to the list | 46 | virtual void addItem(const QString &text, int flag); //! add a string to the list |
47 | virtual void setProgress(int, int); //! set progress bar | 47 | virtual void setProgress(int, int); //! set progress bar |
48 | 48 | ||
49 | virtual void abort(); | ||
50 | virtual void undoAbort(); | ||
51 | virtual void close(); | 49 | virtual void close(); |
52 | virtual void show(); | 50 | virtual void show(); |
51 | virtual void setRunning(); | ||
52 | virtual void setFinished(); | ||
53 | 53 | ||
54 | private: | 54 | private: |
55 | Ui::ProgressLoggerFrm dp; | 55 | Ui::ProgressLoggerFrm dp; |
diff --git a/rbutil/rbutilqt/progressloggerinterface.h b/rbutil/rbutilqt/progressloggerinterface.h index 2459228e79..4a8fd831f1 100644 --- a/rbutil/rbutilqt/progressloggerinterface.h +++ b/rbutil/rbutilqt/progressloggerinterface.h | |||
@@ -49,10 +49,10 @@ public slots: | |||
49 | virtual void addItem(const QString &text)=0; //! add a string to the progress | 49 | virtual void addItem(const QString &text)=0; //! add a string to the progress |
50 | virtual void addItem(const QString &text, int flag)=0; //! add a string to the list, with icon | 50 | virtual void addItem(const QString &text, int flag)=0; //! add a string to the list, with icon |
51 | 51 | ||
52 | virtual void abort()=0; | ||
53 | virtual void undoAbort()=0; | ||
54 | virtual void close()=0; | 52 | virtual void close()=0; |
55 | virtual void show()=0; | 53 | virtual void show()=0; |
54 | virtual void setRunning()=0; | ||
55 | virtual void setFinished()=0; | ||
56 | 56 | ||
57 | private: | 57 | private: |
58 | 58 | ||
diff --git a/rbutil/rbutilqt/rbutilqt.cpp b/rbutil/rbutilqt/rbutilqt.cpp index e126b0ec45..d36f9637c0 100644 --- a/rbutil/rbutilqt/rbutilqt.cpp +++ b/rbutil/rbutilqt/rbutilqt.cpp | |||
@@ -393,7 +393,7 @@ void RbUtilQt::completeInstall() | |||
393 | 393 | ||
394 | if(smallInstallInner()) | 394 | if(smallInstallInner()) |
395 | return; | 395 | return; |
396 | logger->undoAbort(); | 396 | logger->setRunning(); |
397 | // Fonts | 397 | // Fonts |
398 | m_error = false; | 398 | m_error = false; |
399 | m_installed = false; | 399 | m_installed = false; |
@@ -406,7 +406,7 @@ void RbUtilQt::completeInstall() | |||
406 | QApplication::processEvents(); | 406 | QApplication::processEvents(); |
407 | } | 407 | } |
408 | if(m_error) return; | 408 | if(m_error) return; |
409 | logger->undoAbort(); | 409 | logger->setRunning(); |
410 | 410 | ||
411 | // Doom | 411 | // Doom |
412 | if(hasDoom()) | 412 | if(hasDoom()) |
@@ -459,7 +459,7 @@ bool RbUtilQt::smallInstallInner() | |||
459 | // show dialog with error if mount point is wrong | 459 | // show dialog with error if mount point is wrong |
460 | if(!QFileInfo(mountpoint).isDir()) { | 460 | if(!QFileInfo(mountpoint).isDir()) { |
461 | logger->addItem(tr("Mount point is wrong!"),LOGERROR); | 461 | logger->addItem(tr("Mount point is wrong!"),LOGERROR); |
462 | logger->abort(); | 462 | logger->setFinished(); |
463 | return true; | 463 | return true; |
464 | } | 464 | } |
465 | // Bootloader | 465 | // Bootloader |
@@ -469,7 +469,7 @@ bool RbUtilQt::smallInstallInner() | |||
469 | m_installed = false; | 469 | m_installed = false; |
470 | m_auto = true; | 470 | m_auto = true; |
471 | if(!installBootloaderAuto()) { | 471 | if(!installBootloaderAuto()) { |
472 | logger->abort(); | 472 | logger->setFinished(); |
473 | return true; | 473 | return true; |
474 | } | 474 | } |
475 | else | 475 | else |
@@ -480,7 +480,7 @@ bool RbUtilQt::smallInstallInner() | |||
480 | } | 480 | } |
481 | m_auto = false; | 481 | m_auto = false; |
482 | if(m_error) return true; | 482 | if(m_error) return true; |
483 | logger->undoAbort(); | 483 | logger->setRunning(); |
484 | } | 484 | } |
485 | 485 | ||
486 | // Rockbox | 486 | // Rockbox |
@@ -533,7 +533,7 @@ bool RbUtilQt::installAuto() | |||
533 | QMessageBox::Ok | QMessageBox::Abort, QMessageBox::Abort) == QMessageBox::Abort) | 533 | QMessageBox::Ok | QMessageBox::Abort, QMessageBox::Abort) == QMessageBox::Abort) |
534 | { | 534 | { |
535 | logger->addItem(tr("Aborted!"), LOGERROR); | 535 | logger->addItem(tr("Aborted!"), LOGERROR); |
536 | logger->abort(); | 536 | logger->setFinished(); |
537 | return false; | 537 | return false; |
538 | } | 538 | } |
539 | } | 539 | } |
@@ -568,7 +568,7 @@ bool RbUtilQt::installAuto() | |||
568 | else | 568 | else |
569 | { | 569 | { |
570 | logger->addItem(tr("Backup failed!"),LOGERROR); | 570 | logger->addItem(tr("Backup failed!"),LOGERROR); |
571 | logger->abort(); | 571 | logger->setFinished(); |
572 | return false; | 572 | return false; |
573 | } | 573 | } |
574 | } | 574 | } |
@@ -647,7 +647,7 @@ void RbUtilQt::installBootloader() | |||
647 | } | 647 | } |
648 | else { | 648 | else { |
649 | logger->addItem(tr("No install method known."), LOGERROR); | 649 | logger->addItem(tr("No install method known."), LOGERROR); |
650 | logger->abort(); | 650 | logger->setFinished(); |
651 | return; | 651 | return; |
652 | } | 652 | } |
653 | 653 | ||
@@ -749,7 +749,7 @@ void RbUtilQt::installBootloader() | |||
749 | 749 | ||
750 | // the bootloader install class does NOT use any GUI stuff. | 750 | // the bootloader install class does NOT use any GUI stuff. |
751 | // All messages are passed via signals. | 751 | // All messages are passed via signals. |
752 | connect(bl, SIGNAL(done(bool)), logger, SLOT(abort())); | 752 | connect(bl, SIGNAL(done(bool)), logger, SLOT(setFinished())); |
753 | connect(bl, SIGNAL(done(bool)), this, SLOT(installBootloaderPost(bool))); | 753 | connect(bl, SIGNAL(done(bool)), this, SLOT(installBootloaderPost(bool))); |
754 | connect(bl, SIGNAL(logItem(QString, int)), logger, SLOT(addItem(QString, int))); | 754 | connect(bl, SIGNAL(logItem(QString, int)), logger, SLOT(addItem(QString, int))); |
755 | connect(bl, SIGNAL(logProgress(int, int)), logger, SLOT(setProgress(int, int))); | 755 | connect(bl, SIGNAL(logProgress(int, int)), logger, SLOT(setProgress(int, int))); |
@@ -762,7 +762,7 @@ void RbUtilQt::installBootloader() | |||
762 | tr("Could not create backup file. Continue?"), | 762 | tr("Could not create backup file. Continue?"), |
763 | QMessageBox::No | QMessageBox::Yes) | 763 | QMessageBox::No | QMessageBox::Yes) |
764 | == QMessageBox::No) { | 764 | == QMessageBox::No) { |
765 | logger->abort(); | 765 | logger->setFinished(); |
766 | return; | 766 | return; |
767 | } | 767 | } |
768 | } | 768 | } |
@@ -990,7 +990,7 @@ void RbUtilQt::uninstallBootloader(void) | |||
990 | } | 990 | } |
991 | else { | 991 | else { |
992 | logger->addItem(tr("No uninstall method known."), LOGERROR); | 992 | logger->addItem(tr("No uninstall method known."), LOGERROR); |
993 | logger->abort(); | 993 | logger->setFinished(); |
994 | return; | 994 | return; |
995 | } | 995 | } |
996 | 996 | ||
@@ -1011,7 +1011,7 @@ void RbUtilQt::uninstallBootloader(void) | |||
1011 | int result; | 1011 | int result; |
1012 | result = bl->uninstall(); | 1012 | result = bl->uninstall(); |
1013 | 1013 | ||
1014 | logger->abort(); | 1014 | logger->setFinished(); |
1015 | 1015 | ||
1016 | } | 1016 | } |
1017 | 1017 | ||
@@ -1079,7 +1079,7 @@ void RbUtilQt::installPortable(void) | |||
1079 | // check mountpoint | 1079 | // check mountpoint |
1080 | if(!QFileInfo(settings->value(RbSettings::Mountpoint).toString()).isDir()) { | 1080 | if(!QFileInfo(settings->value(RbSettings::Mountpoint).toString()).isDir()) { |
1081 | logger->addItem(tr("Mount point is wrong!"),LOGERROR); | 1081 | logger->addItem(tr("Mount point is wrong!"),LOGERROR); |
1082 | logger->abort(); | 1082 | logger->setFinished(); |
1083 | return; | 1083 | return; |
1084 | } | 1084 | } |
1085 | 1085 | ||
@@ -1093,7 +1093,7 @@ void RbUtilQt::installPortable(void) | |||
1093 | settings->value(RbSettings::Mountpoint).toString() | 1093 | settings->value(RbSettings::Mountpoint).toString() |
1094 | + "/RockboxUtility.exe")) { | 1094 | + "/RockboxUtility.exe")) { |
1095 | logger->addItem(tr("Error installing Rockbox Utility"), LOGERROR); | 1095 | logger->addItem(tr("Error installing Rockbox Utility"), LOGERROR); |
1096 | logger->abort(); | 1096 | logger->setFinished(); |
1097 | return; | 1097 | return; |
1098 | } | 1098 | } |
1099 | logger->addItem(tr("Installing user configuration"), LOGINFO); | 1099 | logger->addItem(tr("Installing user configuration"), LOGINFO); |
@@ -1101,11 +1101,11 @@ void RbUtilQt::installPortable(void) | |||
1101 | settings->value(RbSettings::Mountpoint).toString() | 1101 | settings->value(RbSettings::Mountpoint).toString() |
1102 | + "/RockboxUtility.ini")) { | 1102 | + "/RockboxUtility.ini")) { |
1103 | logger->addItem(tr("Error installing user configuration"), LOGERROR); | 1103 | logger->addItem(tr("Error installing user configuration"), LOGERROR); |
1104 | logger->abort(); | 1104 | logger->setFinished(); |
1105 | return; | 1105 | return; |
1106 | } | 1106 | } |
1107 | logger->addItem(tr("Successfully installed Rockbox Utility."), LOGOK); | 1107 | logger->addItem(tr("Successfully installed Rockbox Utility."), LOGOK); |
1108 | logger->abort(); | 1108 | logger->setFinished(); |
1109 | logger->setProgressMax(1); | 1109 | logger->setProgressMax(1); |
1110 | logger->setProgressValue(1); | 1110 | logger->setProgressValue(1); |
1111 | 1111 | ||
diff --git a/rbutil/rbutilqt/talkfile.cpp b/rbutil/rbutilqt/talkfile.cpp index fd6f4a2109..d41cb4f440 100644 --- a/rbutil/rbutilqt/talkfile.cpp +++ b/rbutil/rbutilqt/talkfile.cpp | |||
@@ -47,7 +47,7 @@ bool TalkFileCreator::createTalkFiles(ProgressloggerInterface* logger) | |||
47 | { | 47 | { |
48 | m_logger->addItem(errStr.trimmed(),LOGERROR); | 48 | m_logger->addItem(errStr.trimmed(),LOGERROR); |
49 | m_logger->addItem(tr("Init of TTS engine failed"),LOGERROR); | 49 | m_logger->addItem(tr("Init of TTS engine failed"),LOGERROR); |
50 | m_logger->abort(); | 50 | m_logger->setFinished(); |
51 | return false; | 51 | return false; |
52 | } | 52 | } |
53 | 53 | ||
@@ -58,7 +58,7 @@ bool TalkFileCreator::createTalkFiles(ProgressloggerInterface* logger) | |||
58 | if(!m_enc->start()) | 58 | if(!m_enc->start()) |
59 | { | 59 | { |
60 | m_logger->addItem(tr("Init of Encoder engine failed"),LOGERROR); | 60 | m_logger->addItem(tr("Init of Encoder engine failed"),LOGERROR); |
61 | m_logger->abort(); | 61 | m_logger->setFinished(); |
62 | m_tts->stop(); | 62 | m_tts->stop(); |
63 | return false; | 63 | return false; |
64 | } | 64 | } |
@@ -147,7 +147,7 @@ bool TalkFileCreator::createTalkFiles(ProgressloggerInterface* logger) | |||
147 | m_logger->addItem(tr("Finished creating Talk files"),LOGOK); | 147 | m_logger->addItem(tr("Finished creating Talk files"),LOGOK); |
148 | m_logger->setProgressMax(1); | 148 | m_logger->setProgressMax(1); |
149 | m_logger->setProgressValue(1); | 149 | m_logger->setProgressValue(1); |
150 | m_logger->abort(); | 150 | m_logger->setFinished(); |
151 | 151 | ||
152 | return true; | 152 | return true; |
153 | } | 153 | } |
@@ -182,7 +182,7 @@ void TalkFileCreator::doAbort(QStringList cleanupList) | |||
182 | cleanup(cleanupList); | 182 | cleanup(cleanupList); |
183 | m_logger->setProgressMax(1); | 183 | m_logger->setProgressMax(1); |
184 | m_logger->setProgressValue(0); | 184 | m_logger->setProgressValue(0); |
185 | m_logger->abort(); | 185 | m_logger->setFinished(); |
186 | m_tts->stop(); | 186 | m_tts->stop(); |
187 | m_enc->stop(); | 187 | m_enc->stop(); |
188 | } | 188 | } |
diff --git a/rbutil/rbutilqt/themesinstallwindow.cpp b/rbutil/rbutilqt/themesinstallwindow.cpp index 75d3eeb698..56a917cfc6 100644 --- a/rbutil/rbutilqt/themesinstallwindow.cpp +++ b/rbutil/rbutilqt/themesinstallwindow.cpp | |||
@@ -101,7 +101,7 @@ void ThemesInstallWindow::downloadDone(bool error) | |||
101 | "Please check your network and proxy settings.") | 101 | "Please check your network and proxy settings.") |
102 | .arg(getter->errorString()), LOGERROR); | 102 | .arg(getter->errorString()), LOGERROR); |
103 | getter->abort(); | 103 | getter->abort(); |
104 | logger->abort(); | 104 | logger->setFinished(); |
105 | disconnect(getter, SIGNAL(done(bool)), this, SLOT(downloadDone(bool))); | 105 | disconnect(getter, SIGNAL(done(bool)), this, SLOT(downloadDone(bool))); |
106 | connect(logger, SIGNAL(closed()), this, SLOT(close())); | 106 | connect(logger, SIGNAL(closed()), this, SLOT(close())); |
107 | return; | 107 | return; |
@@ -111,12 +111,12 @@ void ThemesInstallWindow::downloadDone(bool error) | |||
111 | qDebug() << "error!"; | 111 | qDebug() << "error!"; |
112 | logger->addItem(tr("the following error occured:\n%1") | 112 | logger->addItem(tr("the following error occured:\n%1") |
113 | .arg(iniDetails.value("error/description", "unknown error").toString()), LOGERROR); | 113 | .arg(iniDetails.value("error/description", "unknown error").toString()), LOGERROR); |
114 | logger->abort(); | 114 | logger->setFinished(); |
115 | connect(logger, SIGNAL(closed()), this, SLOT(close())); | 115 | connect(logger, SIGNAL(closed()), this, SLOT(close())); |
116 | return; | 116 | return; |
117 | } | 117 | } |
118 | logger->addItem(tr("done."), LOGOK); | 118 | logger->addItem(tr("done."), LOGOK); |
119 | logger->abort(); | 119 | logger->setFinished(); |
120 | logger->close(); | 120 | logger->close(); |
121 | 121 | ||
122 | // setup list | 122 | // setup list |
@@ -289,7 +289,7 @@ void ThemesInstallWindow::show() | |||
289 | void ThemesInstallWindow::abort() | 289 | void ThemesInstallWindow::abort() |
290 | { | 290 | { |
291 | igetter.abort(); | 291 | igetter.abort(); |
292 | logger->abort(); | 292 | logger->setFinished(); |
293 | this->close(); | 293 | this->close(); |
294 | } | 294 | } |
295 | 295 | ||
@@ -326,7 +326,7 @@ void ThemesInstallWindow::accept() | |||
326 | // show dialog with error if mount point is wrong | 326 | // show dialog with error if mount point is wrong |
327 | if(!QFileInfo(mountPoint).isDir()) { | 327 | if(!QFileInfo(mountPoint).isDir()) { |
328 | logger->addItem(tr("Mount point is wrong!"),LOGERROR); | 328 | logger->addItem(tr("Mount point is wrong!"),LOGERROR); |
329 | logger->abort(); | 329 | logger->setFinished(); |
330 | return; | 330 | return; |
331 | } | 331 | } |
332 | 332 | ||
diff --git a/rbutil/rbutilqt/voicefile.cpp b/rbutil/rbutilqt/voicefile.cpp index c38977af96..dd547773b8 100644 --- a/rbutil/rbutilqt/voicefile.cpp +++ b/rbutil/rbutilqt/voicefile.cpp | |||
@@ -54,7 +54,7 @@ bool VoiceFileCreator::createVoiceFile(ProgressloggerInterface* logger) | |||
54 | if(!info.open()) | 54 | if(!info.open()) |
55 | { | 55 | { |
56 | m_logger->addItem(tr("could not find rockbox-info.txt"),LOGERROR); | 56 | m_logger->addItem(tr("could not find rockbox-info.txt"),LOGERROR); |
57 | m_logger->abort(); | 57 | m_logger->setFinished(); |
58 | emit done(false); | 58 | emit done(false); |
59 | return false; | 59 | return false; |
60 | } | 60 | } |
@@ -101,14 +101,14 @@ void VoiceFileCreator::downloadDone(bool error) | |||
101 | m_logger->setProgressValue(max); | 101 | m_logger->setProgressValue(max); |
102 | if(getter->httpResponse() != 200 && !getter->isCached()) { | 102 | if(getter->httpResponse() != 200 && !getter->isCached()) { |
103 | m_logger->addItem(tr("Download error: received HTTP error %1.").arg(getter->httpResponse()),LOGERROR); | 103 | m_logger->addItem(tr("Download error: received HTTP error %1.").arg(getter->httpResponse()),LOGERROR); |
104 | m_logger->abort(); | 104 | m_logger->setFinished(); |
105 | emit done(false); | 105 | emit done(false); |
106 | return; | 106 | return; |
107 | } | 107 | } |
108 | if(getter->isCached()) m_logger->addItem(tr("Cached file used."), LOGINFO); | 108 | if(getter->isCached()) m_logger->addItem(tr("Cached file used."), LOGINFO); |
109 | if(error) { | 109 | if(error) { |
110 | m_logger->addItem(tr("Download error: %1").arg(getter->errorString()),LOGERROR); | 110 | m_logger->addItem(tr("Download error: %1").arg(getter->errorString()),LOGERROR); |
111 | m_logger->abort(); | 111 | m_logger->setFinished(); |
112 | emit done(false); | 112 | emit done(false); |
113 | return; | 113 | return; |
114 | } | 114 | } |
@@ -122,7 +122,7 @@ void VoiceFileCreator::downloadDone(bool error) | |||
122 | if(!genlang.open(QIODevice::ReadOnly)) | 122 | if(!genlang.open(QIODevice::ReadOnly)) |
123 | { | 123 | { |
124 | m_logger->addItem(tr("failed to open downloaded file"),LOGERROR); | 124 | m_logger->addItem(tr("failed to open downloaded file"),LOGERROR); |
125 | m_logger->abort(); | 125 | m_logger->setFinished(); |
126 | emit done(false); | 126 | emit done(false); |
127 | return; | 127 | return; |
128 | } | 128 | } |
@@ -136,7 +136,7 @@ void VoiceFileCreator::downloadDone(bool error) | |||
136 | { | 136 | { |
137 | m_logger->addItem(errStr,LOGERROR); | 137 | m_logger->addItem(errStr,LOGERROR); |
138 | m_logger->addItem(tr("Init of TTS engine failed"),LOGERROR); | 138 | m_logger->addItem(tr("Init of TTS engine failed"),LOGERROR); |
139 | m_logger->abort(); | 139 | m_logger->setFinished(); |
140 | emit done(false); | 140 | emit done(false); |
141 | return; | 141 | return; |
142 | } | 142 | } |
@@ -149,7 +149,7 @@ void VoiceFileCreator::downloadDone(bool error) | |||
149 | { | 149 | { |
150 | m_logger->addItem(tr("Init of Encoder engine failed"),LOGERROR); | 150 | m_logger->addItem(tr("Init of Encoder engine failed"),LOGERROR); |
151 | m_tts->stop(); | 151 | m_tts->stop(); |
152 | m_logger->abort(); | 152 | m_logger->setFinished(); |
153 | emit done(false); | 153 | emit done(false); |
154 | return; | 154 | return; |
155 | } | 155 | } |
@@ -191,7 +191,7 @@ void VoiceFileCreator::downloadDone(bool error) | |||
191 | if(voicepairs.size() == 0) | 191 | if(voicepairs.size() == 0) |
192 | { | 192 | { |
193 | m_logger->addItem(tr("The downloaded file was empty!"),LOGERROR); | 193 | m_logger->addItem(tr("The downloaded file was empty!"),LOGERROR); |
194 | m_logger->abort(); | 194 | m_logger->setFinished(); |
195 | m_tts->stop(); | 195 | m_tts->stop(); |
196 | emit done(false); | 196 | emit done(false); |
197 | return; | 197 | return; |
@@ -207,7 +207,7 @@ void VoiceFileCreator::downloadDone(bool error) | |||
207 | if(m_abort) | 207 | if(m_abort) |
208 | { | 208 | { |
209 | m_logger->addItem("aborted.",LOGERROR); | 209 | m_logger->addItem("aborted.",LOGERROR); |
210 | m_logger->abort(); | 210 | m_logger->setFinished(); |
211 | m_tts->stop(); | 211 | m_tts->stop(); |
212 | emit done(false); | 212 | emit done(false); |
213 | return; | 213 | return; |
@@ -256,7 +256,7 @@ void VoiceFileCreator::downloadDone(bool error) | |||
256 | if (ids2 == NULL) | 256 | if (ids2 == NULL) |
257 | { | 257 | { |
258 | m_logger->addItem(tr("Error opening downloaded file"),LOGERROR); | 258 | m_logger->addItem(tr("Error opening downloaded file"),LOGERROR); |
259 | m_logger->abort(); | 259 | m_logger->setFinished(); |
260 | emit done(false); | 260 | emit done(false); |
261 | return; | 261 | return; |
262 | } | 262 | } |
@@ -287,7 +287,7 @@ void VoiceFileCreator::downloadDone(bool error) | |||
287 | m_logger->setProgressMax(100); | 287 | m_logger->setProgressMax(100); |
288 | m_logger->setProgressValue(100); | 288 | m_logger->setProgressValue(100); |
289 | m_logger->addItem(tr("successfully created."),LOGOK); | 289 | m_logger->addItem(tr("successfully created."),LOGOK); |
290 | m_logger->abort(); | 290 | m_logger->setFinished(); |
291 | 291 | ||
292 | emit done(true); | 292 | emit done(true); |
293 | } | 293 | } |
diff --git a/rbutil/rbutilqt/zipinstaller.cpp b/rbutil/rbutilqt/zipinstaller.cpp index 9723e10e69..deff52768a 100644 --- a/rbutil/rbutilqt/zipinstaller.cpp +++ b/rbutil/rbutilqt/zipinstaller.cpp | |||
@@ -59,7 +59,7 @@ void ZipInstaller::installContinue() | |||
59 | } | 59 | } |
60 | else { | 60 | else { |
61 | m_dp->addItem(tr("Installation finished successfully."),LOGOK); | 61 | m_dp->addItem(tr("Installation finished successfully."),LOGOK); |
62 | m_dp->abort(); | 62 | m_dp->setFinished(); |
63 | 63 | ||
64 | emit done(false); | 64 | emit done(false); |
65 | return; | 65 | return; |
@@ -112,14 +112,14 @@ void ZipInstaller::downloadDone(bool error) | |||
112 | m_dp->setProgressValue(max); | 112 | m_dp->setProgressValue(max); |
113 | if(getter->httpResponse() != 200 && !getter->isCached()) { | 113 | if(getter->httpResponse() != 200 && !getter->isCached()) { |
114 | m_dp->addItem(tr("Download error: received HTTP error %1.").arg(getter->httpResponse()),LOGERROR); | 114 | m_dp->addItem(tr("Download error: received HTTP error %1.").arg(getter->httpResponse()),LOGERROR); |
115 | m_dp->abort(); | 115 | m_dp->setFinished(); |
116 | emit done(true); | 116 | emit done(true); |
117 | return; | 117 | return; |
118 | } | 118 | } |
119 | if(getter->isCached()) m_dp->addItem(tr("Cached file used."), LOGINFO); | 119 | if(getter->isCached()) m_dp->addItem(tr("Cached file used."), LOGINFO); |
120 | if(error) { | 120 | if(error) { |
121 | m_dp->addItem(tr("Download error: %1").arg(getter->errorString()),LOGERROR); | 121 | m_dp->addItem(tr("Download error: %1").arg(getter->errorString()),LOGERROR); |
122 | m_dp->abort(); | 122 | m_dp->setFinished(); |
123 | emit done(true); | 123 | emit done(true); |
124 | return; | 124 | return; |
125 | } | 125 | } |
@@ -143,7 +143,7 @@ void ZipInstaller::downloadDone(bool error) | |||
143 | .arg(uz.formatError(ec)),LOGERROR); | 143 | .arg(uz.formatError(ec)),LOGERROR); |
144 | m_dp->setProgressMax(1); | 144 | m_dp->setProgressMax(1); |
145 | m_dp->setProgressValue(1); | 145 | m_dp->setProgressValue(1); |
146 | m_dp->abort(); | 146 | m_dp->setFinished(); |
147 | emit done(true); | 147 | emit done(true); |
148 | return; | 148 | return; |
149 | } | 149 | } |
@@ -153,7 +153,7 @@ void ZipInstaller::downloadDone(bool error) | |||
153 | // cluster sizes on the player). | 153 | // cluster sizes on the player). |
154 | if(filesystemFree(m_mountpoint) < (uz.totalSize() + 1000000)) { | 154 | if(filesystemFree(m_mountpoint) < (uz.totalSize() + 1000000)) { |
155 | m_dp->addItem(tr("Not enough disk space! Aborting."), LOGERROR); | 155 | m_dp->addItem(tr("Not enough disk space! Aborting."), LOGERROR); |
156 | m_dp->abort(); | 156 | m_dp->setFinished(); |
157 | m_dp->setProgressMax(1); | 157 | m_dp->setProgressMax(1); |
158 | m_dp->setProgressValue(1); | 158 | m_dp->setProgressValue(1); |
159 | emit done(true); | 159 | emit done(true); |
@@ -164,7 +164,7 @@ void ZipInstaller::downloadDone(bool error) | |||
164 | if(ec != UnZip::Ok) { | 164 | if(ec != UnZip::Ok) { |
165 | m_dp->addItem(tr("Extracting failed: %1.") | 165 | m_dp->addItem(tr("Extracting failed: %1.") |
166 | .arg(uz.formatError(ec)),LOGERROR); | 166 | .arg(uz.formatError(ec)),LOGERROR); |
167 | m_dp->abort(); | 167 | m_dp->setFinished(); |
168 | m_dp->setProgressMax(1); | 168 | m_dp->setProgressMax(1); |
169 | m_dp->setProgressValue(1); | 169 | m_dp->setProgressValue(1); |
170 | 170 | ||
@@ -188,7 +188,7 @@ void ZipInstaller::downloadDone(bool error) | |||
188 | QFile(m_mountpoint + m_target).remove(); | 188 | QFile(m_mountpoint + m_target).remove(); |
189 | if(!downloadFile->copy(m_mountpoint + m_target)) { | 189 | if(!downloadFile->copy(m_mountpoint + m_target)) { |
190 | m_dp->addItem(tr("Installing file failed."), LOGERROR); | 190 | m_dp->addItem(tr("Installing file failed."), LOGERROR); |
191 | m_dp->abort(); | 191 | m_dp->setFinished(); |
192 | emit done(true); | 192 | emit done(true); |
193 | return; | 193 | return; |
194 | } | 194 | } |