1
0
Fork 0
forked from len0rd/rockbox

- make installation dialog default to the last selection if existing.

- enable cache usage for current builds too -- the http class now checks the timestamp of the file on the server, so there's no more point in not using the cache for current builds too.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19492 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dominik Riebeling 2008-12-19 22:18:07 +00:00
parent 1aa881298e
commit 32a6262b54
3 changed files with 22 additions and 8 deletions

View file

@ -167,7 +167,6 @@ void Install::accept()
installer->setUrl(file);
installer->setLogSection("Rockbox (Base)");
if(!settings->cacheDisabled()
&& !ui.radioCurrent->isChecked()
&& !ui.checkBoxCache->isChecked())
{
installer->setCache(true);
@ -274,7 +273,15 @@ void Install::setVersionStrings(QMap<QString, QString> ver)
qDebug() << "no information about archived version available!";
}
if(!version.value("rel_rev").isEmpty()) {
// try to use the old selection first. If no selection has been made
// in the past, use a preselection based on released status.
if(settings->build() == "stable")
ui.radioStable->setChecked(true);
else if(settings->build() == "archived")
ui.radioArchived->setChecked(true);
else if(settings->build() == "current")
ui.radioCurrent->setChecked(true);
else if(!version.value("rel_rev").isEmpty()) {
ui.radioStable->setChecked(true);
ui.radioStable->setEnabled(true);
QFont font;
@ -289,6 +296,7 @@ void Install::setVersionStrings(QMap<QString, QString> ver)
font.setBold(true);
ui.radioCurrent->setFont(font);
}
qDebug() << "Install::setVersionStrings" << version;
}

View file

@ -124,6 +124,11 @@ QString RbSettings::cachePath()
return userSettings->value("cachepath", QDir::tempPath()).toString();
}
QString RbSettings::build()
{
return userSettings->value("build").toString();
}
QString RbSettings::bootloaderUrl()
{
return devices->value("bootloader_url").toString();

View file

@ -50,6 +50,7 @@ class RbSettings : public QObject
QString bleedingUrl();
QString lastRelease(QString platform);
QString cachePath();
QString build(void);
QString bootloaderUrl();
QString bootloaderInfoUrl();
QString fontUrl();