author | ar <ar> | 2004-10-20 22:13:02 (UTC) |
---|---|---|
committer | ar <ar> | 2004-10-20 22:13:02 (UTC) |
commit | 24b27cb83dfc2a23c26e6edcda84fe26a9e9d685 (patch) (side-by-side diff) | |
tree | 74a0f718dc4199051c4e485d2d6c214a98ac6af6 | |
parent | c0ea353593cd6beed183ee0f9b58a16a869a0308 (diff) | |
download | opie-24b27cb83dfc2a23c26e6edcda84fe26a9e9d685.zip opie-24b27cb83dfc2a23c26e6edcda84fe26a9e9d685.tar.gz opie-24b27cb83dfc2a23c26e6edcda84fe26a9e9d685.tar.bz2 |
- use busy indicator when backing up and restore
-rw-r--r-- | noncore/settings/backup/backuprestore.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/noncore/settings/backup/backuprestore.cpp b/noncore/settings/backup/backuprestore.cpp index 36b101c..1748e8d 100644 --- a/noncore/settings/backup/backuprestore.cpp +++ b/noncore/settings/backup/backuprestore.cpp @@ -7,8 +7,9 @@ #include <opie2/ostorageinfo.h> using namespace Opie::Core; #include <opie2/ofiledialog.h> +#include <opie2/owait.h> using namespace Opie::Ui; #include <qpe/qpeapplication.h> #include <qpe/resource.h> @@ -250,9 +251,13 @@ void BackupAndRestore::backup() "No items selected.",QString("Ok") ); return; } - setCaption(tr("Backup and Restore... working...")); + OWait *owait = new OWait(); + Global::statusMessage( tr( "Backing up..." ) ); + owait->show(); + qApp->processEvents(); + QString outputFile = backupLocations[storeToLocation->currentText()]; QDateTime datetime = QDateTime::currentDateTime(); QString dateString = QString::number( datetime.date().year() ) + QString::number( datetime.date().month() ).rightJustify(2, '0') + @@ -283,8 +288,12 @@ void BackupAndRestore::backup() odebug << commandLine << oendl; int r = system( commandLine ); + owait->hide(); + delete owait; + + //Error-Handling if(r != 0) { perror("Error: "); QString errorMsg= tr( "Error from System:\n" ) + (QString)strerror( errno ); @@ -433,9 +442,13 @@ void BackupAndRestore::restore() QMessageBox::critical(this, tr( "Message" ), tr( "Please select something to restore." ),QString( tr( "Ok") ) ); return; } - setCaption(tr("Backup and Restore... working...")); + + OWait *owait = new OWait(); + Global::statusMessage( tr( "Restore Backup..." ) ); + owait->show(); + qApp->processEvents(); QString restoreFile = backupLocations[restoreSource->currentText()]; restoreFile += "/" + restoreItem->text(0); @@ -466,8 +479,11 @@ void BackupAndRestore::restore() odebug << commandLine << oendl; r = system( commandLine ); + owait->hide(); + delete owait; + //error handling if(r != 0) { QString errorMsg= tr( "Error from System:\n" ) + (QString)strerror( errno ); |