summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Wenger <domonoky@googlemail.com>2008-05-11 20:20:19 +0000
committerDominik Wenger <domonoky@googlemail.com>2008-05-11 20:20:19 +0000
commit4296bc454871ff62476e3dbe56ca0f43c54eff8a (patch)
tree9e38ed2f6ac9b33fcdf51b8a42f54da01541dcda
parent76e6ad9069e05ba0325f12976a92a5853c31762e (diff)
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
-rw-r--r--rbutil/rbutilqt/install.cpp11
-rw-r--r--rbutil/rbutilqt/install.h1
2 files changed, 8 insertions, 4 deletions
diff --git a/rbutil/rbutilqt/install.cpp b/rbutil/rbutilqt/install.cpp
index a505b85d68..c6221e8975 100644
--- a/rbutil/rbutilqt/install.cpp
+++ b/rbutil/rbutilqt/install.cpp
@@ -40,7 +40,8 @@ Install::Install(RbSettings *sett,QWidget *parent) : QDialog(parent)
if(version != "")
{
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
{
@@ -154,8 +155,9 @@ void Install::accept()
if(!settings->cacheDisabled()
&& !ui.radioCurrent->isChecked()
&& !ui.checkBoxCache->isChecked())
- installer->setCache(settings->cachePath());
-
+ {
+ installer->setCache(true);
+ }
installer->setLogVersion(myversion);
installer->setMountPoint(mountPoint);
@@ -167,7 +169,8 @@ void Install::accept()
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)
diff --git a/rbutil/rbutilqt/install.h b/rbutil/rbutilqt/install.h
index f1d649ab61..37fac4f8b7 100644
--- a/rbutil/rbutilqt/install.h
+++ b/rbutil/rbutilqt/install.h
@@ -47,6 +47,7 @@ class Install : public QDialog
QString fileName;
ZipInstaller* installer;
QMap<QString, QString> version;
+ QString m_backupName;
private slots:
void setCached(bool);