summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-11-14 22:37:11 (UTC)
committer llornkcor <llornkcor>2002-11-14 22:37:11 (UTC)
commit3f1d60609657ea69bda453f5c820a23ee5375ab8 (patch) (unidiff)
tree7880d0d76f7ad9edca347783533aba88f977e947
parent4b28f45cd1f6a72f41219786c7fb411523a6d622 (diff)
downloadopie-3f1d60609657ea69bda453f5c820a23ee5375ab8.zip
opie-3f1d60609657ea69bda453f5c820a23ee5375ab8.tar.gz
opie-3f1d60609657ea69bda453f5c820a23ee5375ab8.tar.bz2
fix icon path
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/backup/backuprestore.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/noncore/settings/backup/backuprestore.cpp b/noncore/settings/backup/backuprestore.cpp
index 7a1f0dd..533d3a5 100644
--- a/noncore/settings/backup/backuprestore.cpp
+++ b/noncore/settings/backup/backuprestore.cpp
@@ -38,31 +38,31 @@ BackupAndRestore::BackupAndRestore( QWidget* parent, const char* name)
38 restoreList->header()->hide(); 38 restoreList->header()->hide();
39 connect(backupButton, SIGNAL(clicked()), 39 connect(backupButton, SIGNAL(clicked()),
40 this, SLOT(backupPressed())); 40 this, SLOT(backupPressed()));
41 connect(restoreButton, SIGNAL(clicked()), 41 connect(restoreButton, SIGNAL(clicked()),
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 systemSettings = new QListViewItem(backupList, "System Settings", "", 48 systemSettings = new QListViewItem(backupList, "System Settings", "",
49 "/etc"); 49 "/etc");
50// selectItem(systemSettings); 50 selectItem(systemSettings);
51 applicationSettings = new QListViewItem(backupList, "Application Settings", "", 51 applicationSettings = new QListViewItem(backupList, "Application Settings", "",
52 QDir::homeDirPath() + "/Settings/"); 52 QDir::homeDirPath() + "/Settings/");
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 backupLocations.insert("Documents", "/root/Documents"); 66 backupLocations.insert("Documents", "/root/Documents");
67 backupLocations.insert("CF", "/mnt/cf"); 67 backupLocations.insert("CF", "/mnt/cf");
68 backupLocations.insert("SD", "/mnt/card"); 68 backupLocations.insert("SD", "/mnt/card");
@@ -131,29 +131,29 @@ QList<QListViewItem> BackupAndRestore::getAllItems(QListViewItem *item, QList<QL
131} 131}
132 132
133/** 133/**
134 * Selects and unselects the item by setting the HEADER_BACKUP to B or !. 134 * Selects and unselects the item by setting the HEADER_BACKUP to B or !.
135 * and changing the icon to match 135 * and changing the icon to match
136 * @param currentItem the item to swich the selection choice. 136 * @param currentItem the item to swich the selection choice.
137 */ 137 */
138void BackupAndRestore::selectItem(QListViewItem *currentItem){ 138void BackupAndRestore::selectItem(QListViewItem *currentItem){
139 if(!currentItem) 139 if(!currentItem)
140 return; 140 return;
141 141
142 if(currentItem->text(HEADER_BACKUP) == "B"){ 142 if(currentItem->text(HEADER_BACKUP) == "B"){
143 currentItem->setPixmap(HEADER_NAME, Resource::loadPixmap("null")); 143 currentItem->setPixmap(HEADER_NAME, Resource::loadPixmap("backup/null"));
144 currentItem->setText(HEADER_BACKUP, ""); 144 currentItem->setText(HEADER_BACKUP, "");
145 } 145 }
146 else{ 146 else{
147 currentItem->setPixmap(HEADER_NAME, Resource::loadPixmap("check")); 147 currentItem->setPixmap(HEADER_NAME, Resource::loadPixmap("backup/check"));
148 currentItem->setText(HEADER_BACKUP, "B"); 148 currentItem->setText(HEADER_BACKUP, "B");
149 } 149 }
150} 150}
151 151
152void BackupAndRestore::scanForApplicationSettings(){ 152void BackupAndRestore::scanForApplicationSettings(){
153 QDir d(applicationSettings->text(BACKUP_LOCATION)); 153 QDir d(applicationSettings->text(BACKUP_LOCATION));
154 d.setFilter( QDir::Files | QDir::NoSymLinks ); 154 d.setFilter( QDir::Files | QDir::NoSymLinks );
155 const QFileInfoList *list = d.entryInfoList(); 155 const QFileInfoList *list = d.entryInfoList();
156 QFileInfoListIterator it( *list ); 156 QFileInfoListIterator it( *list );
157 QFileInfo *fi; 157 QFileInfo *fi;
158 while ( (fi=it.current()) ) { 158 while ( (fi=it.current()) ) {
159 //qDebug((d.path()+fi->fileName()).latin1()); 159 //qDebug((d.path()+fi->fileName()).latin1());