summaryrefslogtreecommitdiffstats
path: root/rbutil
diff options
context:
space:
mode:
authorDominik Wenger <domonoky@googlemail.com>2008-05-11 18:53:24 +0000
committerDominik Wenger <domonoky@googlemail.com>2008-05-11 18:53:24 +0000
commit76e6ad9069e05ba0325f12976a92a5853c31762e (patch)
treead39620c93fdd1d044a21a650f5a5dd6d1761ace /rbutil
parent1aa6cde3eaa49c6607cc5827c0a7c8e6dd355a1a (diff)
downloadrockbox-76e6ad9069e05ba0325f12976a92a5853c31762e.tar.gz
rockbox-76e6ad9069e05ba0325f12976a92a5853c31762e.tar.bz2
rockbox-76e6ad9069e05ba0325f12976a92a5853c31762e.zip
rbutil: more improvements for the backup mechanism.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17465 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/rbutilqt/install.cpp20
-rw-r--r--rbutil/rbutilqt/install.h5
-rw-r--r--rbutil/rbutilqt/installfrm.ui54
-rw-r--r--rbutil/rbutilqt/rbutilqt.cpp2
4 files changed, 64 insertions, 17 deletions
diff --git a/rbutil/rbutilqt/install.cpp b/rbutil/rbutilqt/install.cpp
index e9f1f61837..a505b85d68 100644
--- a/rbutil/rbutilqt/install.cpp
+++ b/rbutil/rbutilqt/install.cpp
@@ -32,6 +32,7 @@ Install::Install(RbSettings *sett,QWidget *parent) : QDialog(parent)
connect(ui.radioCurrent, SIGNAL(toggled(bool)), this, SLOT(setDetailsCurrent(bool)));
connect(ui.radioArchived, SIGNAL(toggled(bool)), this, SLOT(setDetailsArchived(bool)));
connect(ui.changeBackup,SIGNAL(pressed()),this,SLOT(changeBackupPath()));
+ connect(ui.backup,SIGNAL(stateChanged(int)),this,SLOT(backupCheckboxChanged(int)));
//! check if rockbox is already installed
QString version = installedVersion(settings->mountpoint());
@@ -39,12 +40,29 @@ Install::Install(RbSettings *sett,QWidget *parent) : QDialog(parent)
if(version != "")
{
ui.Backupgroup->show();
- ui.backupLocation->setText(settings->mountpoint() + ".backup/rockbox-backup-"+version+".zip");
+ ui.backupLocation->setText(settings->mountpoint() + "/.backup/rockbox-backup-"+version+".zip");
}
else
{
ui.Backupgroup->hide();
}
+ backupCheckboxChanged(Qt::Unchecked);
+}
+
+void Install::backupCheckboxChanged(int state)
+{
+ if(state == Qt::Checked)
+ {
+ ui.backupLabel->show();
+ ui.backupLocation->show();
+ ui.changeBackup->show();
+ }
+ else
+ {
+ ui.backupLabel->hide();
+ ui.backupLocation->hide();
+ ui.changeBackup->hide();
+ }
}
diff --git a/rbutil/rbutilqt/install.h b/rbutil/rbutilqt/install.h
index 9c4705697e..f1d649ab61 100644
--- a/rbutil/rbutilqt/install.h
+++ b/rbutil/rbutilqt/install.h
@@ -36,8 +36,6 @@ class Install : public QDialog
public slots:
void accept(void);
- void updateDataReadProgress(int read, int total);
- void changeBackupPath();
private:
Ui::InstallFrm ui;
@@ -56,6 +54,9 @@ class Install : public QDialog
void setDetailsStable(bool);
void setDetailsArchived(bool);
void done(bool);
+ void updateDataReadProgress(int read, int total);
+ void changeBackupPath();
+ void backupCheckboxChanged(int state);
};
diff --git a/rbutil/rbutilqt/installfrm.ui b/rbutil/rbutilqt/installfrm.ui
index 6a2a541f64..c1a6b82a1e 100644
--- a/rbutil/rbutilqt/installfrm.ui
+++ b/rbutil/rbutilqt/installfrm.ui
@@ -8,8 +8,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>600</width>
- <height>450</height>
+ <width>644</width>
+ <height>500</height>
</rect>
</property>
<property name="windowTitle" >
@@ -163,17 +163,6 @@
</property>
</widget>
</item>
- <item row="1" column="0" >
- <widget class="QLabel" name="label_3" >
- <property name="text" >
- <string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
-&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
-p, li { white-space: pre-wrap; }
-&lt;/style>&lt;/head>&lt;body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
-&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-size:8pt; font-weight:600;">Backup Location:&lt;/span>&lt;/p>&lt;/body>&lt;/html></string>
- </property>
- </widget>
- </item>
<item row="1" column="1" >
<widget class="QLabel" name="backupLocation" >
<property name="text" >
@@ -183,12 +172,51 @@ p, li { white-space: pre-wrap; }
</item>
<item row="1" column="2" >
<widget class="QPushButton" name="changeBackup" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize" >
+ <size>
+ <width>60</width>
+ <height>16777215</height>
+ </size>
+ </property>
<property name="text" >
<string>Change</string>
</property>
</widget>
</item>
+ <item row="1" column="0" >
+ <widget class="QLabel" name="backupLabel" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Preferred" hsizetype="Minimum" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize" >
+ <size>
+ <width>120</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text" >
+ <string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
+&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
+p, li { white-space: pre-wrap; }
+&lt;/style>&lt;/head>&lt;body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
+&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-size:8pt; font-weight:600;">Backup Location:&lt;/span>&lt;/p>&lt;/body>&lt;/html></string>
+ </property>
+ </widget>
+ </item>
</layout>
+ <zorder>backup</zorder>
+ <zorder>backupLocation</zorder>
+ <zorder>changeBackup</zorder>
+ <zorder>backupLabel</zorder>
</widget>
</item>
<item row="5" column="1" >
diff --git a/rbutil/rbutilqt/rbutilqt.cpp b/rbutil/rbutilqt/rbutilqt.cpp
index 187e369d32..25bc1a3b8e 100644
--- a/rbutil/rbutilqt/rbutilqt.cpp
+++ b/rbutil/rbutilqt/rbutilqt.cpp
@@ -473,7 +473,7 @@ bool RbUtilQt::installAuto()
QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes)
{
logger->addItem(tr("Beginning Backup..."),LOGINFO);
- QString backupName = settings->mountpoint() + ".backup/rockbox-backup-"+rbVersion+".zip";
+ QString backupName = settings->mountpoint() + "/.backup/rockbox-backup-"+rbVersion+".zip";
//! create dir, if it doesnt exist
QFileInfo backupFile(backupName);