Diffstat (limited to 'noncore/settings/backup/backuprestore.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/backup/backuprestore.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/noncore/settings/backup/backuprestore.cpp b/noncore/settings/backup/backuprestore.cpp index 478b22f..36b101c 100644 --- a/noncore/settings/backup/backuprestore.cpp +++ b/noncore/settings/backup/backuprestore.cpp | |||
@@ -4,12 +4,15 @@ | |||
4 | 4 | ||
5 | /* OPIE */ | 5 | /* OPIE */ |
6 | #include <opie2/odebug.h> | 6 | #include <opie2/odebug.h> |
7 | #include <opie2/ostorageinfo.h> | 7 | #include <opie2/ostorageinfo.h> |
8 | using namespace Opie::Core; | 8 | using namespace Opie::Core; |
9 | 9 | ||
10 | #include <opie2/ofiledialog.h> | ||
11 | using namespace Opie::Ui; | ||
12 | |||
10 | #include <qpe/qpeapplication.h> | 13 | #include <qpe/qpeapplication.h> |
11 | #include <qpe/resource.h> | 14 | #include <qpe/resource.h> |
12 | #include <qpe/config.h> | 15 | #include <qpe/config.h> |
13 | 16 | ||
14 | /* QT */ | 17 | /* QT */ |
15 | #include <qapplication.h> | 18 | #include <qapplication.h> |
@@ -54,12 +57,13 @@ BackupAndRestore::BackupAndRestore( QWidget* parent, const char* name, WFlags f | |||
54 | connect( restoreButton, SIGNAL( clicked() ), this, SLOT( restore() ) ); | 57 | connect( restoreButton, SIGNAL( clicked() ), this, SLOT( restore() ) ); |
55 | connect( backupList, SIGNAL( clicked( QListViewItem* ) ), this, SLOT( selectItem( QListViewItem* ) ) ); | 58 | connect( backupList, SIGNAL( clicked( QListViewItem* ) ), this, SLOT( selectItem( QListViewItem* ) ) ); |
56 | connect( restoreSource, SIGNAL( activated( int ) ), this, SLOT( sourceDirChanged( int ) ) ); | 59 | connect( restoreSource, SIGNAL( activated( int ) ), this, SLOT( sourceDirChanged( int ) ) ); |
57 | connect( addLocationButton, SIGNAL( clicked() ), this, SLOT( addLocation() ) ); | 60 | connect( addLocationButton, SIGNAL( clicked() ), this, SLOT( addLocation() ) ); |
58 | connect( removeLocationButton, SIGNAL( clicked() ), this, SLOT( removeLocation() ) ); | 61 | connect( removeLocationButton, SIGNAL( clicked() ), this, SLOT( removeLocation() ) ); |
59 | connect( saveLocationsButton, SIGNAL( clicked() ), this, SLOT( saveLocations() ) ); | 62 | connect( saveLocationsButton, SIGNAL( clicked() ), this, SLOT( saveLocations() ) ); |
63 | connect( selectLocationButton, SIGNAL( clicked() ), this, SLOT( selectLocation() ) ); | ||
60 | 64 | ||
61 | //add directorys for backing up | 65 | //add directorys for backing up |
62 | applicationSettings = new QListViewItem(backupList, "Application Settings", "", "Settings/"); | 66 | applicationSettings = new QListViewItem(backupList, "Application Settings", "", "Settings/"); |
63 | selectItem(applicationSettings); | 67 | selectItem(applicationSettings); |
64 | applicationSettings = new QListViewItem(backupList, "Application Data", "", "Applications/"); | 68 | applicationSettings = new QListViewItem(backupList, "Application Data", "", "Applications/"); |
65 | selectItem(applicationSettings); | 69 | selectItem(applicationSettings); |
@@ -586,8 +590,17 @@ void BackupAndRestore::saveLocations() | |||
586 | } | 590 | } |
587 | config.writeEntry( "locations", locations, '|' ); | 591 | config.writeEntry( "locations", locations, '|' ); |
588 | 592 | ||
589 | refreshBackupLocations(); | 593 | refreshBackupLocations(); |
590 | } | 594 | } |
591 | 595 | ||
596 | void BackupAndRestore::selectLocation() | ||
597 | { | ||
598 | QString location = OFileDialog::getDirectory( OFileSelector::DIRECTORYSELECTOR ); | ||
599 | if ( !location.isEmpty() ) | ||
600 | { | ||
601 | locationEdit->setText( location ); | ||
602 | } | ||
603 | } | ||
604 | |||
592 | // backuprestore.cpp | 605 | // backuprestore.cpp |
593 | 606 | ||