summaryrefslogtreecommitdiff
authorschurig <schurig>2003-06-04 10:21:09 (UTC)
committer schurig <schurig>2003-06-04 10:21:09 (UTC)
commitf270a608c3396c076650f969c96b25d83cb7afe9 (patch) (unidiff)
tree7b26a19084adf31a4bf4765eefe90c566ea35f25
parent37db2bc4ade2b96616a7a0c01041fc65b3ef4d16 (diff)
downloadopie-f270a608c3396c076650f969c96b25d83cb7afe9.zip
opie-f270a608c3396c076650f969c96b25d83cb7afe9.tar.gz
opie-f270a608c3396c076650f969c96b25d83cb7afe9.tar.bz2
ramses has no SD, but MMC
ramses has CF, but that slot is always occupied with a WLAN card
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/backup/backuprestore.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/noncore/settings/backup/backuprestore.cpp b/noncore/settings/backup/backuprestore.cpp
index 358f663..59e15a2 100644
--- a/noncore/settings/backup/backuprestore.cpp
+++ b/noncore/settings/backup/backuprestore.cpp
@@ -42,51 +42,60 @@ BackupAndRestore::BackupAndRestore( QWidget* parent, const char* name)
42 this, SLOT(restore())); 42 this, SLOT(restore()));
43 connect(backupList, SIGNAL(clicked( QListViewItem * )), 43 connect(backupList, SIGNAL(clicked( QListViewItem * )),
44 this, SLOT(selectItem(QListViewItem*))); 44 this, SLOT(selectItem(QListViewItem*)));
45 connect(restoreSource, SIGNAL(activated( int )), 45 connect(restoreSource, SIGNAL(activated( int )),
46 this, SLOT(sourceDirChanged(int))); 46 this, SLOT(sourceDirChanged(int)));
47 47
48 applicationSettings = new QListViewItem(backupList, "Application Settings", "", 48 applicationSettings = new QListViewItem(backupList, "Application Settings", "",
49 QDir::homeDirPath() + "/Settings/"); 49 QDir::homeDirPath() + "/Settings/");
50 selectItem(applicationSettings); 50 selectItem(applicationSettings);
51 applicationSettings = new QListViewItem(backupList, "Application Data", "", 51 applicationSettings = new QListViewItem(backupList, "Application Data", "",
52 QDir::homeDirPath() + "/Applications/"); 52 QDir::homeDirPath() + "/Applications/");
53 selectItem(applicationSettings); 53 selectItem(applicationSettings);
54 documents= new QListViewItem(backupList, "Documents", "", 54 documents= new QListViewItem(backupList, "Documents", "",
55 QDir::homeDirPath() + "/Documents/"); 55 QDir::homeDirPath() + "/Documents/");
56 selectItem(documents); 56 selectItem(documents);
57 57
58 scanForApplicationSettings(); 58 scanForApplicationSettings();
59 59
60 Config config("BackupAndRestore"); 60 Config config("BackupAndRestore");
61 config.setGroup("General"); 61 config.setGroup("General");
62 int totalLocations = config.readNumEntry("totalLocations",0); 62 int totalLocations = config.readNumEntry("totalLocations",0);
63 63
64//todo make less static here and use Storage class to get infos 64//todo make less static here and use Storage class to get infos
65 if(totalLocations == 0){ 65 if(totalLocations == 0){
66
67/* Ramses has a CF-Slot, but that one is internal and you have to dismount the
68 * the case. There's also almost always a WLAN card inserted there
69*/
70
66 backupLocations.insert("Documents", "/root/Documents"); 71 backupLocations.insert("Documents", "/root/Documents");
72#if defined(QT_QWS_RAMSES)
73 backupLocations.insert("MMC", "/mnt/card");
74#else
67 backupLocations.insert("CF", "/mnt/cf"); 75 backupLocations.insert("CF", "/mnt/cf");
68 backupLocations.insert("SD", "/mnt/card"); 76 backupLocations.insert("SD", "/mnt/card");
77#endif
69 } 78 }
70 else{ 79 else{
71 for(int i = 0; i < totalLocations; i++){ 80 for(int i = 0; i < totalLocations; i++){
72 backupLocations.insert(config.readEntry(QString("backupLocationName_%1").arg(i)), 81 backupLocations.insert(config.readEntry(QString("backupLocationName_%1").arg(i)),
73 config.readEntry(QString("backupLocation_%1").arg(i))); 82 config.readEntry(QString("backupLocation_%1").arg(i)));
74 } 83 }
75 } 84 }
76 QMap<QString, QString>::Iterator it; 85 QMap<QString, QString>::Iterator it;
77 for( it = backupLocations.begin(); it != backupLocations.end(); ++it ){ 86 for( it = backupLocations.begin(); it != backupLocations.end(); ++it ){
78 storeToLocation->insertItem(it.key()); 87 storeToLocation->insertItem(it.key());
79 restoreSource->insertItem(it.key()); 88 restoreSource->insertItem(it.key());
80 } 89 }
81 90
82 // Read the list of items to ignore. 91 // Read the list of items to ignore.
83 QList<QString> dontBackupList; 92 QList<QString> dontBackupList;
84 dontBackupList.setAutoDelete(true); 93 dontBackupList.setAutoDelete(true);
85 config.setGroup("DontBackup"); 94 config.setGroup("DontBackup");
86 int total = config.readNumEntry("Total", 0); 95 int total = config.readNumEntry("Total", 0);
87 for(int i = 0; i < total; i++){ 96 for(int i = 0; i < total; i++){
88 dontBackupList.append(new QString(config.readEntry(QString("%1").arg(i), ""))); 97 dontBackupList.append(new QString(config.readEntry(QString("%1").arg(i), "")));
89 } 98 }
90 99
91 QList<QListViewItem> list; 100 QList<QListViewItem> list;
92 getAllItems(backupList->firstChild(), list); 101 getAllItems(backupList->firstChild(), list);