author | schurig <schurig> | 2003-06-04 10:21:09 (UTC) |
---|---|---|
committer | schurig <schurig> | 2003-06-04 10:21:09 (UTC) |
commit | f270a608c3396c076650f969c96b25d83cb7afe9 (patch) (side-by-side diff) | |
tree | 7b26a19084adf31a4bf4765eefe90c566ea35f25 | |
parent | 37db2bc4ade2b96616a7a0c01041fc65b3ef4d16 (diff) | |
download | opie-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
-rw-r--r-- | noncore/settings/backup/backuprestore.cpp | 9 |
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 @@ -34,67 +34,76 @@ BackupAndRestore::BackupAndRestore( QWidget* parent, const char* name) : BackupAndRestoreBase(parent, name){ this->showMaximized(); backupList->header()->hide(); restoreList->header()->hide(); connect(backupButton, SIGNAL(clicked()), this, SLOT(backupPressed())); connect(restoreButton, SIGNAL(clicked()), this, SLOT(restore())); connect(backupList, SIGNAL(clicked( QListViewItem * )), this, SLOT(selectItem(QListViewItem*))); connect(restoreSource, SIGNAL(activated( int )), this, SLOT(sourceDirChanged(int))); applicationSettings = new QListViewItem(backupList, "Application Settings", "", QDir::homeDirPath() + "/Settings/"); selectItem(applicationSettings); applicationSettings = new QListViewItem(backupList, "Application Data", "", QDir::homeDirPath() + "/Applications/"); selectItem(applicationSettings); documents= new QListViewItem(backupList, "Documents", "", QDir::homeDirPath() + "/Documents/"); selectItem(documents); scanForApplicationSettings(); Config config("BackupAndRestore"); config.setGroup("General"); int totalLocations = config.readNumEntry("totalLocations",0); //todo make less static here and use Storage class to get infos if(totalLocations == 0){ + +/* Ramses has a CF-Slot, but that one is internal and you have to dismount the + * the case. There's also almost always a WLAN card inserted there +*/ + backupLocations.insert("Documents", "/root/Documents"); +#if defined(QT_QWS_RAMSES) + backupLocations.insert("MMC", "/mnt/card"); +#else backupLocations.insert("CF", "/mnt/cf"); backupLocations.insert("SD", "/mnt/card"); +#endif } else{ for(int i = 0; i < totalLocations; i++){ backupLocations.insert(config.readEntry(QString("backupLocationName_%1").arg(i)), config.readEntry(QString("backupLocation_%1").arg(i))); } } QMap<QString, QString>::Iterator it; for( it = backupLocations.begin(); it != backupLocations.end(); ++it ){ storeToLocation->insertItem(it.key()); restoreSource->insertItem(it.key()); } // Read the list of items to ignore. QList<QString> dontBackupList; dontBackupList.setAutoDelete(true); config.setGroup("DontBackup"); int total = config.readNumEntry("Total", 0); for(int i = 0; i < total; i++){ dontBackupList.append(new QString(config.readEntry(QString("%1").arg(i), ""))); } QList<QListViewItem> list; getAllItems(backupList->firstChild(), list); for(uint i = 0; i < list.count(); i++){ QString text = list.at(i)->text(HEADER_NAME); for(uint i2 = 0; i2 < dontBackupList.count(); i2++){ if(*dontBackupList.at(i2) == text){ selectItem(list.at(i)); break; } |