summaryrefslogtreecommitdiff
path: root/noncore/settings/backup
authorllornkcor <llornkcor>2002-11-14 12:34:11 (UTC)
committer llornkcor <llornkcor>2002-11-14 12:34:11 (UTC)
commitd419cd6d7f96341efc16717d68d7f7a0cfc09a80 (patch) (unidiff)
tree3c12ccf13c348d6e905bcc8976b833295ae608a2 /noncore/settings/backup
parent9daeebf24f8a7cb00216df90527d993c5ff7df0d (diff)
downloadopie-d419cd6d7f96341efc16717d68d7f7a0cfc09a80.zip
opie-d419cd6d7f96341efc16717d68d7f7a0cfc09a80.tar.gz
opie-d419cd6d7f96341efc16717d68d7f7a0cfc09a80.tar.bz2
use real filepaths instead of Sharps idiotic ones
Diffstat (limited to 'noncore/settings/backup') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/backup/backuprestore.cpp44
1 files changed, 29 insertions, 15 deletions
diff --git a/noncore/settings/backup/backuprestore.cpp b/noncore/settings/backup/backuprestore.cpp
index 5776f3c..fb892d9 100644
--- a/noncore/settings/backup/backuprestore.cpp
+++ b/noncore/settings/backup/backuprestore.cpp
@@ -21,3 +21,4 @@
21 21
22BackupAndRestore::BackupAndRestore( QWidget* parent, const char* name) : BackupAndRestoreBase(parent, name){ 22BackupAndRestore::BackupAndRestore( QWidget* parent, const char* name)
23 : BackupAndRestoreBase(parent, name){
23 this->showMaximized(); 24 this->showMaximized();
@@ -25,12 +26,19 @@ BackupAndRestore::BackupAndRestore( QWidget* parent, const char* name) : BackupA
25 restoreList->header()->hide(); 26 restoreList->header()->hide();
26 connect(backupButton, SIGNAL(clicked()), this, SLOT(backupPressed())); 27 connect(backupButton, SIGNAL(clicked()),
27 connect(restoreButton, SIGNAL(clicked()), this, SLOT(restore())); 28 this, SLOT(backupPressed()));
28 connect(backupList, SIGNAL(clicked( QListViewItem * )), this, SLOT(selectItem(QListViewItem*))); 29 connect(restoreButton, SIGNAL(clicked()),
29 connect(restoreSource, SIGNAL(activated( int )), this, SLOT(sourceDirChanged(int))); 30 this, SLOT(restore()));
30 31 connect(backupList, SIGNAL(clicked( QListViewItem * )),
31 systemSettings = new QListViewItem(backupList, "System Settings", "", "/home/etc"); 32 this, SLOT(selectItem(QListViewItem*)));
33 connect(restoreSource, SIGNAL(activated( int )),
34 this, SLOT(sourceDirChanged(int)));
35
36 systemSettings = new QListViewItem(backupList, "System Settings", "",
37 "/etc");
32 selectItem(systemSettings); 38 selectItem(systemSettings);
33 applicationSettings = new QListViewItem(backupList, "Application Settings", "", QDir::homeDirPath() + "/Settings/"); 39 applicationSettings = new QListViewItem(backupList, "Application Settings", "",
40 QDir::homeDirPath() + "/Settings/");
34 selectItem(applicationSettings); 41 selectItem(applicationSettings);
35 documents= new QListViewItem(backupList, "Documents", "", QDir::homeDirPath() + "/Documents/"); 42 documents= new QListViewItem(backupList, "Documents", "",
43 QDir::homeDirPath() + "/Documents/");
36 selectItem(documents); 44 selectItem(documents);
@@ -43,4 +51,5 @@ BackupAndRestore::BackupAndRestore( QWidget* parent, const char* name) : BackupA
43 51
52//todo make less static here and use Storage class to get infos
44 if(totalLocations == 0){ 53 if(totalLocations == 0){
45 backupLocations.insert("Documents", "/home/root/Documents"); 54 backupLocations.insert("Documents", "/root/Documents");
46 backupLocations.insert("CF", "/mnt/cf"); 55 backupLocations.insert("CF", "/mnt/cf");
@@ -50,3 +59,4 @@ BackupAndRestore::BackupAndRestore( QWidget* parent, const char* name) : BackupA
50 for(int i = 0; i < totalLocations; i++){ 59 for(int i = 0; i < totalLocations; i++){
51 backupLocations.insert(config.readEntry(QString("backupLocationName_%1").arg(i)), config.readEntry(QString("backupLocation_%1").arg(i))); 60 backupLocations.insert(config.readEntry(QString("backupLocationName_%1").arg(i)),
61 config.readEntry(QString("backupLocation_%1").arg(i)));
52 } 62 }
@@ -152,3 +162,4 @@ void BackupAndRestore::backupPressed(){
152 if(getBackupFiles(backupFiles, NULL) == 0){ 162 if(getBackupFiles(backupFiles, NULL) == 0){
153 QMessageBox::critical(this, "Message", "No items selected.",QString("Ok") ); 163 QMessageBox::critical(this, "Message",
164 "No items selected.",QString("Ok") );
154 return; 165 return;
@@ -256,3 +267,4 @@ void BackupAndRestore::restore(){
256 if(!restoreItem){ 267 if(!restoreItem){
257 QMessageBox::critical(this, "Message", "Please select something to restore.",QString("Ok") ); 268 QMessageBox::critical(this, "Message",
269 "Please select something to restore.",QString("Ok") );
258 return; 270 return;
@@ -265,6 +277,8 @@ void BackupAndRestore::restore(){
265 if(r != 0){ 277 if(r != 0){
266 QMessageBox::critical(this, "Message", "Restore Failed.",QString("Ok") ); 278 QMessageBox::critical(this, "Message",
279 "Restore Failed.",QString("Ok") );
267 } 280 }
268 else{ 281 else{
269 QMessageBox::critical(this, "Message", "Restore Successfull.",QString("Ok") ); 282 QMessageBox::critical(this, "Message",
283 "Restore Successfull.",QString("Ok") );
270 } 284 }