Diffstat (limited to 'kabc/plugins/opie/resourceopie.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | kabc/plugins/opie/resourceopie.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/kabc/plugins/opie/resourceopie.cpp b/kabc/plugins/opie/resourceopie.cpp index 1436508..aaee801 100644 --- a/kabc/plugins/opie/resourceopie.cpp +++ b/kabc/plugins/opie/resourceopie.cpp @@ -41,4 +41,5 @@ $Id$ //US #include <ksavefile.h> #include <kstandarddirs.h> +#include <kmessagebox.h> //US #include "formatfactory.h" @@ -94,6 +95,4 @@ void ResourceOpie::init( const QString &fileName ) connect( &mDirWatch, SIGNAL( deleted(const QString&) ), SLOT( fileChanged() ) ); - //US opie addressbook is always readonly -//US setReadOnly( true ); setFileName( fileName ); @@ -372,4 +371,11 @@ void ResourceOpie::fileChanged() if (!addressBook()) return; + + QString text( i18n( "Opie 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(); + } + load(); addressBook()->emitAddressBookChanged(); |