diff options
Diffstat (limited to 'rbutil/rbutilqt/rbutilqt.cpp')
-rw-r--r-- | rbutil/rbutilqt/rbutilqt.cpp | 36 |
1 files changed, 13 insertions, 23 deletions
diff --git a/rbutil/rbutilqt/rbutilqt.cpp b/rbutil/rbutilqt/rbutilqt.cpp index 34a1990aa6..3a594ef0ad 100644 --- a/rbutil/rbutilqt/rbutilqt.cpp +++ b/rbutil/rbutilqt/rbutilqt.cpp | |||
@@ -714,21 +714,11 @@ void RbUtilQt::installBootloader() | |||
714 | } | 714 | } |
715 | } | 715 | } |
716 | 716 | ||
717 | if(bl->capabilities() & BootloaderInstallBase::NeedsFlashing) | 717 | if(bl->capabilities() & BootloaderInstallBase::NeedsOf) |
718 | { | 718 | { |
719 | int ret; | 719 | int ret; |
720 | ret = QMessageBox::information(this, tr("Prerequisites"), | 720 | ret = QMessageBox::information(this, tr("Prerequisites"), |
721 | tr("Bootloader installation requires you to provide " | 721 | bl->ofHint(),QMessageBox::Ok | QMessageBox::Abort); |
722 | "a firmware file of the original firmware (hex file). " | ||
723 | "You need to download this file yourself due to legal " | ||
724 | "reasons. Please refer to the " | ||
725 | "<a href='http://www.rockbox.org/manual.shtml'>manual</a> and the " | ||
726 | "<a href='http://www.rockbox.org/wiki/IriverBoot" | ||
727 | "#Download_and_extract_a_recent_ve'>IriverBoot</a> wiki page on " | ||
728 | "how to obtain this file.<br/>" | ||
729 | "Press Ok to continue and browse your computer for the firmware " | ||
730 | "file."), | ||
731 | QMessageBox::Ok | QMessageBox::Abort); | ||
732 | if(ret != QMessageBox::Ok) { | 722 | if(ret != QMessageBox::Ok) { |
733 | // consider aborting an error to close window / abort automatic | 723 | // consider aborting an error to close window / abort automatic |
734 | // installation. | 724 | // installation. |
@@ -736,16 +726,16 @@ void RbUtilQt::installBootloader() | |||
736 | logger->addItem(tr("Bootloader installation aborted"), LOGINFO); | 726 | logger->addItem(tr("Bootloader installation aborted"), LOGINFO); |
737 | return; | 727 | return; |
738 | } | 728 | } |
739 | // open dialog to browse to hex file | 729 | // open dialog to browse to of file |
740 | QString hexfile; | 730 | QString offile; |
741 | hexfile = QFileDialog::getOpenFileName(this, | 731 | offile = QFileDialog::getOpenFileName(this, |
742 | tr("Select firmware file"), QDir::homePath(), "*.hex"); | 732 | tr("Select firmware file"), QDir::homePath()); |
743 | if(!QFileInfo(hexfile).isReadable()) { | 733 | if(!QFileInfo(offile).isReadable()) { |
744 | logger->addItem(tr("Error opening firmware file"), LOGERROR); | 734 | logger->addItem(tr("Error opening firmware file"), LOGERROR); |
745 | m_error = true; | 735 | m_error = true; |
746 | return; | 736 | return; |
747 | } | 737 | } |
748 | ((BootloaderInstallHex*)bl)->setHexfile(hexfile); | 738 | bl->setOfFile(offile); |
749 | } | 739 | } |
750 | 740 | ||
751 | // the bootloader install class does NOT use any GUI stuff. | 741 | // the bootloader install class does NOT use any GUI stuff. |
@@ -983,19 +973,19 @@ void RbUtilQt::uninstallBootloader(void) | |||
983 | BootloaderInstallBase *bl; | 973 | BootloaderInstallBase *bl; |
984 | QString type = RbSettings::value(RbSettings::CurBootloaderMethod).toString(); | 974 | QString type = RbSettings::value(RbSettings::CurBootloaderMethod).toString(); |
985 | if(type == "mi4") { | 975 | if(type == "mi4") { |
986 | bl = new BootloaderInstallMi4(); | 976 | bl = new BootloaderInstallMi4(this); |
987 | } | 977 | } |
988 | else if(type == "hex") { | 978 | else if(type == "hex") { |
989 | bl = new BootloaderInstallHex(); | 979 | bl = new BootloaderInstallHex(this); |
990 | } | 980 | } |
991 | else if(type == "sansa") { | 981 | else if(type == "sansa") { |
992 | bl = new BootloaderInstallSansa(); | 982 | bl = new BootloaderInstallSansa(this); |
993 | } | 983 | } |
994 | else if(type == "ipod") { | 984 | else if(type == "ipod") { |
995 | bl = new BootloaderInstallIpod(); | 985 | bl = new BootloaderInstallIpod(this); |
996 | } | 986 | } |
997 | else if(type == "file") { | 987 | else if(type == "file") { |
998 | bl = new BootloaderInstallFile(); | 988 | bl = new BootloaderInstallFile(this); |
999 | } | 989 | } |
1000 | else { | 990 | else { |
1001 | logger->addItem(tr("No uninstall method known."), LOGERROR); | 991 | logger->addItem(tr("No uninstall method known."), LOGERROR); |