diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2012-07-01 12:21:20 +0200 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2012-07-01 12:34:59 +0200 |
commit | d8f5a00fc1cd8beff431bd236377b3fccece29fd (patch) | |
tree | ce1a51f82f26fec50ea4fa69223597956e8ab0d1 /rbutil | |
parent | a455f5901aab95eda4f22bb36796baa2eedfa8da (diff) |
Install widget: fallback to development build.
If neither an old selected build nor a release is available fallback to
selecting the development build.
Remove some old code that was not supposed to be be kept.
Change-Id: I883535bd8e7981e68bc3fac3bcd5f375e1237242
Diffstat (limited to 'rbutil')
-rw-r--r-- | rbutil/rbutilqt/gui/selectiveinstallwidget.cpp | 52 |
1 files changed, 5 insertions, 47 deletions
diff --git a/rbutil/rbutilqt/gui/selectiveinstallwidget.cpp b/rbutil/rbutilqt/gui/selectiveinstallwidget.cpp index ebea57ada5..555c99c546 100644 --- a/rbutil/rbutilqt/gui/selectiveinstallwidget.cpp +++ b/rbutil/rbutilqt/gui/selectiveinstallwidget.cpp @@ -111,10 +111,14 @@ void SelectiveInstallWidget::updateVersion(void) if(index != -1) { ui.selectedVersion->setCurrentIndex(index); } - else { + else if(!m_versions["release"].isEmpty()) { index = ui.selectedVersion->findData("release"); ui.selectedVersion->setCurrentIndex(index); } + else { + index = ui.selectedVersion->findData("current"); + ui.selectedVersion->setCurrentIndex(index); + } // check if Rockbox is installed. If it is untick the bootloader option, as // well as if the selected player doesn't need a bootloader. if(m_blmethod == "none") { @@ -378,52 +382,6 @@ void SelectiveInstallWidget::installRockbox(void) else if(selected == "rc") url = ServerInfo::platformValue(m_target, ServerInfo::RelCandidateUrl).toString(); -#if 0 - RockboxInfo info(m_mountpoint); - if(info.success()) { - // existing installation found. Ask for backup. - QMessageBox::information(this, tr("Backup existing installation?"), - tr("Existing installation detected. Create a backup before installing?"), - QMessageBox::Yes | QMessageBox::No, QMessageBox::No); - - } -#endif -#if 0 - //! check if we should backup - if(ui.backup->isChecked()) - { - m_logger->addItem(tr("Beginning Backup..."),LOGINFO); - QCoreApplication::processEvents(); - - //! create dir, if it doesnt exist - QFileInfo backupFile(m_backupName); - if(!QDir(backupFile.path()).exists()) - { - QDir a; - a.mkpath(backupFile.path()); - } - - //! create backup - bool result = true; - ZipUtil zip(this); - connect(&zip, SIGNAL(logProgress(int, int)), m_logger, SLOT(setProgress(int, int))); - connect(&zip, SIGNAL(logItem(QString, int)), m_logger, SLOT(addItem(QString, int))); - zip.open(m_backupName, QuaZip::mdCreate); - QString mp = RbSettings::value(RbSettings::Mountpoint).toString(); - QString folder = mp + "/.rockbox"; - result = zip.appendDirToArchive(folder, mp); - zip.close(); - if(result) { - m_logger->addItem(tr("Backup finished."), LOGINFO); - } - else { - m_logger->addItem(tr("Backup failed!"), LOGERROR); - m_logger->setFinished(); - return; - } - } -#endif - //! install build if(m_zipinstaller != NULL) delete m_zipinstaller; m_zipinstaller = new ZipInstaller(this); |