author | kergoth <kergoth> | 2003-08-09 17:14:54 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2003-08-09 17:14:54 (UTC) |
commit | a7e015198a8c5ad3b6e144a9032b059086253e00 (patch) (unidiff) | |
tree | b712b6f11310d88744fe393a92b3160b741a7efe /noncore/settings/backup | |
parent | beba0e73306815337bf04dee39502233595e9739 (diff) | |
download | opie-a7e015198a8c5ad3b6e144a9032b059086253e00.zip opie-a7e015198a8c5ad3b6e144a9032b059086253e00.tar.gz opie-a7e015198a8c5ad3b6e144a9032b059086253e00.tar.bz2 |
Merge from BRANCH_1_0
-rw-r--r-- | noncore/settings/backup/backuprestore.cpp | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/noncore/settings/backup/backuprestore.cpp b/noncore/settings/backup/backuprestore.cpp index 4ff6be1..922523b 100644 --- a/noncore/settings/backup/backuprestore.cpp +++ b/noncore/settings/backup/backuprestore.cpp | |||
@@ -50,60 +50,51 @@ BackupAndRestore::BackupAndRestore( QWidget* parent, const char* name) | |||
50 | this, SLOT(selectItem(QListViewItem*))); | 50 | this, SLOT(selectItem(QListViewItem*))); |
51 | connect(restoreSource, SIGNAL(activated( int )), | 51 | connect(restoreSource, SIGNAL(activated( int )), |
52 | this, SLOT(sourceDirChanged(int))); | 52 | this, SLOT(sourceDirChanged(int))); |
53 | connect(updateList, SIGNAL(clicked()), | 53 | connect(updateList, SIGNAL(clicked()), |
54 | this, SLOT( fileListUpdate())); | 54 | this, SLOT( fileListUpdate())); |
55 | 55 | ||
56 | applicationSettings = new QListViewItem(backupList, "Application Settings", "", | 56 | applicationSettings = new QListViewItem(backupList, "Application Settings", "", |
57 | QDir::homeDirPath() + "/Settings/"); | 57 | QDir::homeDirPath() + "/Settings/"); |
58 | selectItem(applicationSettings); | 58 | selectItem(applicationSettings); |
59 | applicationSettings = new QListViewItem(backupList, "Application Data", "", | 59 | applicationSettings = new QListViewItem(backupList, "Application Data", "", |
60 | QDir::homeDirPath() + "/Applications/"); | 60 | QDir::homeDirPath() + "/Applications/"); |
61 | selectItem(applicationSettings); | 61 | selectItem(applicationSettings); |
62 | documents= new QListViewItem(backupList, "Documents", "", | 62 | documents= new QListViewItem(backupList, "Documents", "", |
63 | QDir::homeDirPath() + "/Documents/"); | 63 | QDir::homeDirPath() + "/Documents/"); |
64 | selectItem(documents); | 64 | selectItem(documents); |
65 | 65 | ||
66 | scanForApplicationSettings(); | 66 | scanForApplicationSettings(); |
67 | 67 | ||
68 | Config config("BackupAndRestore"); | 68 | Config config("BackupAndRestore"); |
69 | config.setGroup("General"); | 69 | config.setGroup("General"); |
70 | int totalLocations = config.readNumEntry("totalLocations",0); | 70 | int totalLocations = config.readNumEntry("totalLocations",0); |
71 | 71 | ||
72 | //todo make less static here and use Storage class to get infos | 72 | //todo make less static here and use Storage class to get infos |
73 | if(totalLocations == 0){ | 73 | if(totalLocations == 0){ |
74 | |||
75 | /* Ramses has a CF-Slot, but that one is internal and you have to dismount the | ||
76 | * the case. There's also almost always a WLAN card inserted there | ||
77 | */ | ||
78 | |||
79 | backupLocations.insert("Documents", "/root/Documents"); | 74 | backupLocations.insert("Documents", "/root/Documents"); |
80 | #if defined(QT_QWS_RAMSES) | ||
81 | backupLocations.insert("MMC", "/mnt/card"); | ||
82 | #else | ||
83 | backupLocations.insert("CF", "/mnt/cf"); | 75 | backupLocations.insert("CF", "/mnt/cf"); |
84 | backupLocations.insert("SD", "/mnt/card"); | 76 | backupLocations.insert("SD", "/mnt/card"); |
85 | #endif | ||
86 | } | 77 | } |
87 | else{ | 78 | else{ |
88 | for(int i = 0; i < totalLocations; i++){ | 79 | for(int i = 0; i < totalLocations; i++){ |
89 | backupLocations.insert(config.readEntry(QString("backupLocationName_%1").arg(i)), | 80 | backupLocations.insert(config.readEntry(QString("backupLocationName_%1").arg(i)), |
90 | config.readEntry(QString("backupLocation_%1").arg(i))); | 81 | config.readEntry(QString("backupLocation_%1").arg(i))); |
91 | } | 82 | } |
92 | } | 83 | } |
93 | QMap<QString, QString>::Iterator it; | 84 | QMap<QString, QString>::Iterator it; |
94 | for( it = backupLocations.begin(); it != backupLocations.end(); ++it ){ | 85 | for( it = backupLocations.begin(); it != backupLocations.end(); ++it ){ |
95 | storeToLocation->insertItem(it.key()); | 86 | storeToLocation->insertItem(it.key()); |
96 | restoreSource->insertItem(it.key()); | 87 | restoreSource->insertItem(it.key()); |
97 | } | 88 | } |
98 | 89 | ||
99 | // Read the list of items to ignore. | 90 | // Read the list of items to ignore. |
100 | QList<QString> dontBackupList; | 91 | QList<QString> dontBackupList; |
101 | dontBackupList.setAutoDelete(true); | 92 | dontBackupList.setAutoDelete(true); |
102 | config.setGroup("DontBackup"); | 93 | config.setGroup("DontBackup"); |
103 | int total = config.readNumEntry("Total", 0); | 94 | int total = config.readNumEntry("Total", 0); |
104 | for(int i = 0; i < total; i++){ | 95 | for(int i = 0; i < total; i++){ |
105 | dontBackupList.append(new QString(config.readEntry(QString("%1").arg(i), ""))); | 96 | dontBackupList.append(new QString(config.readEntry(QString("%1").arg(i), ""))); |
106 | } | 97 | } |
107 | 98 | ||
108 | QList<QListViewItem> list; | 99 | QList<QListViewItem> list; |
109 | getAllItems(backupList->firstChild(), list); | 100 | getAllItems(backupList->firstChild(), list); |