summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rbutil/rbutilqt/rbutilqt.cpp36
-rw-r--r--rbutil/rbutilqt/rbutilqt.h2
2 files changed, 19 insertions, 19 deletions
diff --git a/rbutil/rbutilqt/rbutilqt.cpp b/rbutil/rbutilqt/rbutilqt.cpp
index cb991a21b7..466f379666 100644
--- a/rbutil/rbutilqt/rbutilqt.cpp
+++ b/rbutil/rbutilqt/rbutilqt.cpp
@@ -356,7 +356,7 @@ void RbUtilQt::updateSettings()
356 " or review your settings.")); 356 " or review your settings."));
357 configDialog(); 357 configDialog();
358 } 358 }
359 else if(chkConfig(false)) { 359 else if(chkConfig(0)) {
360 QApplication::processEvents(); 360 QApplication::processEvents();
361 QMessageBox::critical(this, tr("Configuration error"), 361 QMessageBox::critical(this, tr("Configuration error"),
362 tr("Your configuration is invalid. This is most likely due " 362 tr("Your configuration is invalid. This is most likely due "
@@ -387,7 +387,7 @@ void RbUtilQt::updateDevice()
387 ui.actionRemove_bootloader->setEnabled(bootloaderUninstallable); 387 ui.actionRemove_bootloader->setEnabled(bootloaderUninstallable);
388 388
389 /* Disable the whole tab widget if configuration is invalid */ 389 /* Disable the whole tab widget if configuration is invalid */
390 bool configurationValid = !chkConfig(false); 390 bool configurationValid = !chkConfig(0);
391 ui.tabWidget->setEnabled(configurationValid); 391 ui.tabWidget->setEnabled(configurationValid);
392 ui.menuA_ctions->setEnabled(configurationValid); 392 ui.menuA_ctions->setEnabled(configurationValid);
393 393
@@ -451,7 +451,7 @@ void RbUtilQt::updateManual()
451 451
452void RbUtilQt::completeInstall() 452void RbUtilQt::completeInstall()
453{ 453{
454 if(chkConfig(true)) return; 454 if(chkConfig(this)) return;
455 if(QMessageBox::question(this, tr("Confirm Installation"), 455 if(QMessageBox::question(this, tr("Confirm Installation"),
456 tr("Do you really want to perform a complete installation?\n\n" 456 tr("Do you really want to perform a complete installation?\n\n"
457 "This will install Rockbox %1. To install the most recent " 457 "This will install Rockbox %1. To install the most recent "
@@ -507,7 +507,7 @@ void RbUtilQt::completeInstall()
507 507
508void RbUtilQt::smallInstall() 508void RbUtilQt::smallInstall()
509{ 509{
510 if(chkConfig(true)) return; 510 if(chkConfig(this)) return;
511 if(QMessageBox::question(this, tr("Confirm Installation"), 511 if(QMessageBox::question(this, tr("Confirm Installation"),
512 tr("Do you really want to perform a minimal installation? " 512 tr("Do you really want to perform a minimal installation? "
513 "A minimal installation will contain only the absolutely " 513 "A minimal installation will contain only the absolutely "
@@ -581,7 +581,7 @@ void RbUtilQt::installdone(bool error)
581 581
582void RbUtilQt::installBtn() 582void RbUtilQt::installBtn()
583{ 583{
584 if(chkConfig(true)) return; 584 if(chkConfig(this)) return;
585 install(); 585 install();
586} 586}
587 587
@@ -684,7 +684,7 @@ bool RbUtilQt::installBootloaderAuto()
684 684
685void RbUtilQt::installBootloaderBtn() 685void RbUtilQt::installBootloaderBtn()
686{ 686{
687 if(chkConfig(true)) return; 687 if(chkConfig(this)) return;
688 if(QMessageBox::question(this, tr("Confirm Installation"), 688 if(QMessageBox::question(this, tr("Confirm Installation"),
689 tr("Do you really want to install the Bootloader?"), 689 tr("Do you really want to install the Bootloader?"),
690 QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) return; 690 QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) return;
@@ -846,7 +846,7 @@ void RbUtilQt::installBootloaderPost(bool error)
846 846
847void RbUtilQt::installFontsBtn() 847void RbUtilQt::installFontsBtn()
848{ 848{
849 if(chkConfig(true)) return; 849 if(chkConfig(this)) return;
850 QString mountpoint = RbSettings::value(RbSettings::Mountpoint).toString(); 850 QString mountpoint = RbSettings::value(RbSettings::Mountpoint).toString();
851 RockboxInfo installInfo(mountpoint); 851 RockboxInfo installInfo(mountpoint);
852 if(installInfo.revision().isEmpty() && installInfo.release().isEmpty()) { 852 if(installInfo.revision().isEmpty() && installInfo.release().isEmpty()) {
@@ -910,7 +910,7 @@ void RbUtilQt::installFonts()
910 910
911void RbUtilQt::installVoice() 911void RbUtilQt::installVoice()
912{ 912{
913 if(chkConfig(true)) return; 913 if(chkConfig(this)) return;
914 914
915 if(m_gotInfo == false) 915 if(m_gotInfo == false)
916 { 916 {
@@ -980,7 +980,7 @@ void RbUtilQt::installVoice()
980 980
981void RbUtilQt::installDoomBtn() 981void RbUtilQt::installDoomBtn()
982{ 982{
983 if(chkConfig(true)) return; 983 if(chkConfig(this)) return;
984 if(!hasDoom()){ 984 if(!hasDoom()){
985 QMessageBox::critical(this, tr("Error"), 985 QMessageBox::critical(this, tr("Error"),
986 tr("Your device doesn't have a doom plugin. Aborting.")); 986 tr("Your device doesn't have a doom plugin. Aborting."));
@@ -1031,7 +1031,7 @@ void RbUtilQt::installDoom()
1031 1031
1032void RbUtilQt::installThemes() 1032void RbUtilQt::installThemes()
1033{ 1033{
1034 if(chkConfig(true)) return; 1034 if(chkConfig(this)) return;
1035 ThemesInstallWindow* tw = new ThemesInstallWindow(this); 1035 ThemesInstallWindow* tw = new ThemesInstallWindow(this);
1036 tw->setModal(true); 1036 tw->setModal(true);
1037 tw->show(); 1037 tw->show();
@@ -1039,7 +1039,7 @@ void RbUtilQt::installThemes()
1039 1039
1040void RbUtilQt::createTalkFiles(void) 1040void RbUtilQt::createTalkFiles(void)
1041{ 1041{
1042 if(chkConfig(true)) return; 1042 if(chkConfig(this)) return;
1043 InstallTalkWindow *installWindow = new InstallTalkWindow(this); 1043 InstallTalkWindow *installWindow = new InstallTalkWindow(this);
1044 connect(installWindow, SIGNAL(settingsUpdated()), this, SLOT(updateSettings())); 1044 connect(installWindow, SIGNAL(settingsUpdated()), this, SLOT(updateSettings()));
1045 installWindow->show(); 1045 installWindow->show();
@@ -1048,16 +1048,16 @@ void RbUtilQt::createTalkFiles(void)
1048 1048
1049void RbUtilQt::createVoiceFile(void) 1049void RbUtilQt::createVoiceFile(void)
1050{ 1050{
1051 if(chkConfig(true)) return; 1051 if(chkConfig(this)) return;
1052 CreateVoiceWindow *installWindow = new CreateVoiceWindow(this); 1052 CreateVoiceWindow *installWindow = new CreateVoiceWindow(this);
1053 1053
1054 connect(installWindow, SIGNAL(settingsUpdated()), this, SLOT(updateSettings())); 1054 connect(installWindow, SIGNAL(settingsUpdated()), this, SLOT(updateSettings()));
1055 installWindow->show(); 1055 installWindow->show();
1056} 1056}
1057 1057
1058void RbUtilQt::uninstall(void) 1058void RbUtilQt::uninstall(void)
1059{ 1059{
1060 if(chkConfig(true)) return; 1060 if(chkConfig(this)) return;
1061 UninstallWindow *uninstallWindow = new UninstallWindow(this); 1061 UninstallWindow *uninstallWindow = new UninstallWindow(this);
1062 uninstallWindow->show(); 1062 uninstallWindow->show();
1063 1063
@@ -1065,7 +1065,7 @@ void RbUtilQt::uninstall(void)
1065 1065
1066void RbUtilQt::uninstallBootloader(void) 1066void RbUtilQt::uninstallBootloader(void)
1067{ 1067{
1068 if(chkConfig(true)) return; 1068 if(chkConfig(this)) return;
1069 if(QMessageBox::question(this, tr("Confirm Uninstallation"), 1069 if(QMessageBox::question(this, tr("Confirm Uninstallation"),
1070 tr("Do you really want to uninstall the Bootloader?"), 1070 tr("Do you really want to uninstall the Bootloader?"),
1071 QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) return; 1071 QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) return;
@@ -1117,7 +1117,7 @@ void RbUtilQt::uninstallBootloader(void)
1117 1117
1118void RbUtilQt::downloadManual(void) 1118void RbUtilQt::downloadManual(void)
1119{ 1119{
1120 if(chkConfig(true)) return; 1120 if(chkConfig(this)) return;
1121 if(QMessageBox::question(this, tr("Confirm download"), 1121 if(QMessageBox::question(this, tr("Confirm download"),
1122 tr("Do you really want to download the manual? The manual will be saved " 1122 tr("Do you really want to download the manual? The manual will be saved "
1123 "to the root folder of your player."), 1123 "to the root folder of your player."),
@@ -1290,7 +1290,7 @@ QUrl RbUtilQt::proxy()
1290} 1290}
1291 1291
1292 1292
1293bool RbUtilQt::chkConfig(bool warn) 1293bool RbUtilQt::chkConfig(QWidget *parent)
1294{ 1294{
1295 bool error = false; 1295 bool error = false;
1296 if(RbSettings::value(RbSettings::Platform).toString().isEmpty() 1296 if(RbSettings::value(RbSettings::Platform).toString().isEmpty()
@@ -1298,7 +1298,7 @@ bool RbUtilQt::chkConfig(bool warn)
1298 || !QFileInfo(RbSettings::value(RbSettings::Mountpoint).toString()).isWritable()) { 1298 || !QFileInfo(RbSettings::value(RbSettings::Mountpoint).toString()).isWritable()) {
1299 error = true; 1299 error = true;
1300 1300
1301 if(warn) QMessageBox::critical(this, tr("Configuration error"), 1301 if(parent) QMessageBox::critical(parent, tr("Configuration error"),
1302 tr("Your configuration is invalid. Please go to the configuration " 1302 tr("Your configuration is invalid. Please go to the configuration "
1303 "dialog and make sure the selected values are correct.")); 1303 "dialog and make sure the selected values are correct."));
1304 } 1304 }
diff --git a/rbutil/rbutilqt/rbutilqt.h b/rbutil/rbutilqt/rbutilqt.h
index 35a06cd7b3..5cc1f0de94 100644
--- a/rbutil/rbutilqt/rbutilqt.h
+++ b/rbutil/rbutilqt/rbutilqt.h
@@ -40,6 +40,7 @@ class RbUtilQt : public QMainWindow
40 public: 40 public:
41 RbUtilQt(QWidget *parent = 0); 41 RbUtilQt(QWidget *parent = 0);
42 static QList<QTranslator*> translators; 42 static QList<QTranslator*> translators;
43 static bool chkConfig(QWidget *parent = 0);
43 44
44 private: 45 private:
45 Ui::RbUtilQtFrm ui; 46 Ui::RbUtilQtFrm ui;
@@ -58,7 +59,6 @@ class RbUtilQt : public QMainWindow
58 ProgressLoggerGui *logger; 59 ProgressLoggerGui *logger;
59 ZipInstaller *installer; 60 ZipInstaller *installer;
60 QUrl proxy(void); 61 QUrl proxy(void);
61 bool chkConfig(bool);
62 62
63 volatile bool m_installed; 63 volatile bool m_installed;
64 volatile bool m_error; 64 volatile bool m_error;