From 24b27cb83dfc2a23c26e6edcda84fe26a9e9d685 Mon Sep 17 00:00:00 2001 From: ar Date: Wed, 20 Oct 2004 22:13:02 +0000 Subject: - use busy indicator when backing up and restore --- (limited to 'noncore/settings/backup') 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 @@ -8,6 +8,7 @@ using namespace Opie::Core; #include +#include using namespace Opie::Ui; #include @@ -251,7 +252,11 @@ void BackupAndRestore::backup() 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(); @@ -284,6 +289,10 @@ void BackupAndRestore::backup() int r = system( commandLine ); + owait->hide(); + delete owait; + + //Error-Handling if(r != 0) { perror("Error: "); @@ -434,7 +443,11 @@ void BackupAndRestore::restore() 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()]; @@ -467,6 +480,9 @@ void BackupAndRestore::restore() r = system( commandLine ); + owait->hide(); + delete owait; + //error handling if(r != 0) { -- cgit v0.9.0.2