-rw-r--r-- | kabc/plugins/file/resourcefile.cpp | 10 |
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 @@ -41,8 +41,9 @@ $Id$ #include <kdebug.h> #include <klocale.h> //US #include <ksavefile.h> #include <kstandarddirs.h> +#include <kmessagebox.h> #include "formatfactory.h" #include "resource.h" @@ -371,10 +372,15 @@ void ResourceFile::fileChanged() // There is a small theoretical chance that KDirWatch calls us before // 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 ) { |