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:
parent
1aa881298e
commit
32a6262b54
3 changed files with 22 additions and 8 deletions
|
|
@ -33,10 +33,10 @@ Install::Install(RbSettings *sett,QWidget *parent) : QDialog(parent)
|
||||||
connect(ui.radioArchived, SIGNAL(toggled(bool)), this, SLOT(setDetailsArchived(bool)));
|
connect(ui.radioArchived, SIGNAL(toggled(bool)), this, SLOT(setDetailsArchived(bool)));
|
||||||
connect(ui.changeBackup,SIGNAL(pressed()),this,SLOT(changeBackupPath()));
|
connect(ui.changeBackup,SIGNAL(pressed()),this,SLOT(changeBackupPath()));
|
||||||
connect(ui.backup,SIGNAL(stateChanged(int)),this,SLOT(backupCheckboxChanged(int)));
|
connect(ui.backup,SIGNAL(stateChanged(int)),this,SLOT(backupCheckboxChanged(int)));
|
||||||
|
|
||||||
//! check if rockbox is already installed
|
//! check if rockbox is already installed
|
||||||
QString version = Detect::installedVersion(settings->mountpoint());
|
QString version = Detect::installedVersion(settings->mountpoint());
|
||||||
|
|
||||||
if(version != "")
|
if(version != "")
|
||||||
{
|
{
|
||||||
ui.Backupgroup->show();
|
ui.Backupgroup->show();
|
||||||
|
|
@ -48,7 +48,7 @@ Install::Install(RbSettings *sett,QWidget *parent) : QDialog(parent)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ui.Backupgroup->hide();
|
ui.Backupgroup->hide();
|
||||||
}
|
}
|
||||||
backupCheckboxChanged(Qt::Unchecked);
|
backupCheckboxChanged(Qt::Unchecked);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -167,16 +167,15 @@ void Install::accept()
|
||||||
installer->setUrl(file);
|
installer->setUrl(file);
|
||||||
installer->setLogSection("Rockbox (Base)");
|
installer->setLogSection("Rockbox (Base)");
|
||||||
if(!settings->cacheDisabled()
|
if(!settings->cacheDisabled()
|
||||||
&& !ui.radioCurrent->isChecked()
|
|
||||||
&& !ui.checkBoxCache->isChecked())
|
&& !ui.checkBoxCache->isChecked())
|
||||||
{
|
{
|
||||||
installer->setCache(true);
|
installer->setCache(true);
|
||||||
}
|
}
|
||||||
installer->setLogVersion(myversion);
|
installer->setLogVersion(myversion);
|
||||||
installer->setMountPoint(mountPoint);
|
installer->setMountPoint(mountPoint);
|
||||||
|
|
||||||
connect(installer, SIGNAL(done(bool)), this, SLOT(done(bool)));
|
connect(installer, SIGNAL(done(bool)), this, SLOT(done(bool)));
|
||||||
|
|
||||||
installer->install(logger);
|
installer->install(logger);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -274,7 +273,15 @@ void Install::setVersionStrings(QMap<QString, QString> ver)
|
||||||
qDebug() << "no information about archived version available!";
|
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->setChecked(true);
|
||||||
ui.radioStable->setEnabled(true);
|
ui.radioStable->setEnabled(true);
|
||||||
QFont font;
|
QFont font;
|
||||||
|
|
@ -289,6 +296,7 @@ void Install::setVersionStrings(QMap<QString, QString> ver)
|
||||||
font.setBold(true);
|
font.setBold(true);
|
||||||
ui.radioCurrent->setFont(font);
|
ui.radioCurrent->setFont(font);
|
||||||
}
|
}
|
||||||
|
|
||||||
qDebug() << "Install::setVersionStrings" << version;
|
qDebug() << "Install::setVersionStrings" << version;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -124,6 +124,11 @@ QString RbSettings::cachePath()
|
||||||
return userSettings->value("cachepath", QDir::tempPath()).toString();
|
return userSettings->value("cachepath", QDir::tempPath()).toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString RbSettings::build()
|
||||||
|
{
|
||||||
|
return userSettings->value("build").toString();
|
||||||
|
}
|
||||||
|
|
||||||
QString RbSettings::bootloaderUrl()
|
QString RbSettings::bootloaderUrl()
|
||||||
{
|
{
|
||||||
return devices->value("bootloader_url").toString();
|
return devices->value("bootloader_url").toString();
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,7 @@ class RbSettings : public QObject
|
||||||
QString bleedingUrl();
|
QString bleedingUrl();
|
||||||
QString lastRelease(QString platform);
|
QString lastRelease(QString platform);
|
||||||
QString cachePath();
|
QString cachePath();
|
||||||
|
QString build(void);
|
||||||
QString bootloaderUrl();
|
QString bootloaderUrl();
|
||||||
QString bootloaderInfoUrl();
|
QString bootloaderInfoUrl();
|
||||||
QString fontUrl();
|
QString fontUrl();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue