summaryrefslogtreecommitdiffabout
path: root/kabc/plugins/file
authorulf69 <ulf69>2004-07-15 05:06:06 (UTC)
committer ulf69 <ulf69>2004-07-15 05:06:06 (UTC)
commit59f727076930aada485db6531d4084f2bfe0b928 (patch) (side-by-side diff)
treed68ab61d9f78759d36d8ccb2cdd3312987bf7917 /kabc/plugins/file
parent2ada2bfd67b5488115268e6667e55a9b4b297fa2 (diff)
downloadkdepimpi-59f727076930aada485db6531d4084f2bfe0b928.zip
kdepimpi-59f727076930aada485db6531d4084f2bfe0b928.tar.gz
kdepimpi-59f727076930aada485db6531d4084f2bfe0b928.tar.bz2
ask for readwrite resources if the user wants them to reload in the case of an
external change.
Diffstat (limited to 'kabc/plugins/file') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/plugins/file/resourcefile.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/kabc/plugins/file/resourcefile.cpp b/kabc/plugins/file/resourcefile.cpp
index 9f9b00f..1d3acec 100644
--- a/kabc/plugins/file/resourcefile.cpp
+++ b/kabc/plugins/file/resourcefile.cpp
@@ -42,6 +42,7 @@ $Id$
#include <klocale.h>
//US #include <ksavefile.h>
#include <kstandarddirs.h>
+#include <kmessagebox.h>
#include "formatfactory.h"
@@ -372,8 +373,13 @@ void ResourceFile::fileChanged()
// we are fully constructed
if (!addressBook())
return;
- load();
- addressBook()->emitAddressBookChanged();
+
+
+ QString text( i18n( "File resource '%1'<br> has been changed by third party.<br>Do you want to reload?").arg( mFileName ) );
+ if ( readOnly() || KMessageBox::questionYesNo( 0, text ) == KMessageBox::Yes ) {
+ load();
+ addressBook()->emitAddressBookChanged();
+ }
}
void ResourceFile::removeAddressee( const Addressee &addr )