author | llornkcor <llornkcor> | 2002-11-14 22:37:11 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-11-14 22:37:11 (UTC) |
commit | 3f1d60609657ea69bda453f5c820a23ee5375ab8 (patch) (side-by-side diff) | |
tree | 7880d0d76f7ad9edca347783533aba88f977e947 | |
parent | 4b28f45cd1f6a72f41219786c7fb411523a6d622 (diff) | |
download | opie-3f1d60609657ea69bda453f5c820a23ee5375ab8.zip opie-3f1d60609657ea69bda453f5c820a23ee5375ab8.tar.gz opie-3f1d60609657ea69bda453f5c820a23ee5375ab8.tar.bz2 |
fix icon path
-rw-r--r-- | noncore/settings/backup/backuprestore.cpp | 8 |
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 @@ -34,39 +34,39 @@ 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))); systemSettings = new QListViewItem(backupList, "System Settings", "", "/etc"); -// selectItem(systemSettings); + selectItem(systemSettings); applicationSettings = new QListViewItem(backupList, "Application Settings", "", QDir::homeDirPath() + "/Settings/"); selectItem(applicationSettings); documents= new QListViewItem(backupList, "Documents", "", QDir::homeDirPath() + "/Documents/"); -// selectItem(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){ backupLocations.insert("Documents", "/root/Documents"); backupLocations.insert("CF", "/mnt/cf"); backupLocations.insert("SD", "/mnt/card"); } else{ for(int i = 0; i < totalLocations; i++){ backupLocations.insert(config.readEntry(QString("backupLocationName_%1").arg(i)), @@ -127,37 +127,37 @@ QList<QListViewItem> BackupAndRestore::getAllItems(QListViewItem *item, QList<QL list.append(item); item = item->nextSibling(); } return list; } /** * Selects and unselects the item by setting the HEADER_BACKUP to B or !. * and changing the icon to match * @param currentItem the item to swich the selection choice. */ void BackupAndRestore::selectItem(QListViewItem *currentItem){ if(!currentItem) return; if(currentItem->text(HEADER_BACKUP) == "B"){ - currentItem->setPixmap(HEADER_NAME, Resource::loadPixmap("null")); + currentItem->setPixmap(HEADER_NAME, Resource::loadPixmap("backup/null")); currentItem->setText(HEADER_BACKUP, ""); } else{ - currentItem->setPixmap(HEADER_NAME, Resource::loadPixmap("check")); + currentItem->setPixmap(HEADER_NAME, Resource::loadPixmap("backup/check")); currentItem->setText(HEADER_BACKUP, "B"); } } void BackupAndRestore::scanForApplicationSettings(){ QDir d(applicationSettings->text(BACKUP_LOCATION)); d.setFilter( QDir::Files | QDir::NoSymLinks ); const QFileInfoList *list = d.entryInfoList(); QFileInfoListIterator it( *list ); QFileInfo *fi; while ( (fi=it.current()) ) { //qDebug((d.path()+fi->fileName()).latin1()); QListViewItem *newItem = new QListViewItem(applicationSettings, fi->fileName()); selectItem(newItem); ++it; } |