From 59f727076930aada485db6531d4084f2bfe0b928 Mon Sep 17 00:00:00 2001 From: ulf69 Date: Thu, 15 Jul 2004 05:06:06 +0000 Subject: ask for readwrite resources if the user wants them to reload in the case of an external change. --- (limited to 'kabc/plugins/dir/resourcedir.cpp') diff --git a/kabc/plugins/dir/resourcedir.cpp b/kabc/plugins/dir/resourcedir.cpp index 7825c6f..52863d5 100644 --- a/kabc/plugins/dir/resourcedir.cpp +++ b/kabc/plugins/dir/resourcedir.cpp @@ -44,6 +44,7 @@ $Id$ #include #include #include +#include #include "addressbook.h" @@ -54,8 +55,6 @@ $Id$ //US #include -//US #include "../../formats/vcardformatplugin2.h" -//US #include "../../formats/binaryformat.h" #include "resourcedir.h" @@ -345,8 +344,11 @@ void ResourceDir::pathChanged() if ( !addressBook() ) return; - load(); - addressBook()->emitAddressBookChanged(); + QString text( i18n( "Dir resource '%1'
has been changed by third party.
Do you want to reload?").arg( mPath ) ); + if ( readOnly() || KMessageBox::questionYesNo( 0, text ) == KMessageBox::Yes ) { + load(); + addressBook()->emitAddressBookChanged(); + } } void ResourceDir::removeAddressee( const Addressee& addr ) -- cgit v0.9.0.2