forked from len0rd/rockbox
rbutil: use elides in the backup filename, also fix cache for archived builds.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17466 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
76e6ad9069
commit
4296bc4548
2 changed files with 8 additions and 4 deletions
|
|
@ -40,7 +40,8 @@ Install::Install(RbSettings *sett,QWidget *parent) : QDialog(parent)
|
||||||
if(version != "")
|
if(version != "")
|
||||||
{
|
{
|
||||||
ui.Backupgroup->show();
|
ui.Backupgroup->show();
|
||||||
ui.backupLocation->setText(settings->mountpoint() + "/.backup/rockbox-backup-"+version+".zip");
|
m_backupName = settings->mountpoint() + "/.backup/rockbox-backup-"+version+".zip";
|
||||||
|
ui.backupLocation->setText(fontMetrics().elidedText(m_backupName,Qt::ElideMiddle,200));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -154,8 +155,9 @@ void Install::accept()
|
||||||
if(!settings->cacheDisabled()
|
if(!settings->cacheDisabled()
|
||||||
&& !ui.radioCurrent->isChecked()
|
&& !ui.radioCurrent->isChecked()
|
||||||
&& !ui.checkBoxCache->isChecked())
|
&& !ui.checkBoxCache->isChecked())
|
||||||
installer->setCache(settings->cachePath());
|
{
|
||||||
|
installer->setCache(true);
|
||||||
|
}
|
||||||
installer->setLogVersion(myversion);
|
installer->setLogVersion(myversion);
|
||||||
installer->setMountPoint(mountPoint);
|
installer->setMountPoint(mountPoint);
|
||||||
|
|
||||||
|
|
@ -167,7 +169,8 @@ void Install::accept()
|
||||||
|
|
||||||
void Install::changeBackupPath()
|
void Install::changeBackupPath()
|
||||||
{
|
{
|
||||||
ui.backupLocation->setText(QFileDialog::getSaveFileName(this,"Select Backup Filename",ui.backupLocation->text()));
|
m_backupName = QFileDialog::getSaveFileName(this,"Select Backup Filename",ui.backupLocation->text());
|
||||||
|
ui.backupLocation->setText(QWidget::fontMetrics().elidedText(m_backupName,Qt::ElideMiddle,200));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Install::updateDataReadProgress(int read, int total)
|
void Install::updateDataReadProgress(int read, int total)
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@ class Install : public QDialog
|
||||||
QString fileName;
|
QString fileName;
|
||||||
ZipInstaller* installer;
|
ZipInstaller* installer;
|
||||||
QMap<QString, QString> version;
|
QMap<QString, QString> version;
|
||||||
|
QString m_backupName;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void setCached(bool);
|
void setCached(bool);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue