summaryrefslogtreecommitdiffabout
path: root/kabc/plugins/opie/resourceopie.cpp
Unidiff
Diffstat (limited to 'kabc/plugins/opie/resourceopie.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kabc/plugins/opie/resourceopie.cpp10
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
@@ -40,6 +40,7 @@ $Id$
40#include <klocale.h> 40#include <klocale.h>
41//US #include <ksavefile.h> 41//US #include <ksavefile.h>
42#include <kstandarddirs.h> 42#include <kstandarddirs.h>
43#include <kmessagebox.h>
43 44
44//US #include "formatfactory.h" 45//US #include "formatfactory.h"
45//US #include <qpe/qpeapplication.h> 46//US #include <qpe/qpeapplication.h>
@@ -93,8 +94,6 @@ void ResourceOpie::init( const QString &fileName )
93 connect( &mDirWatch, SIGNAL( created(const QString&) ), SLOT( fileChanged() ) ); 94 connect( &mDirWatch, SIGNAL( created(const QString&) ), SLOT( fileChanged() ) );
94 connect( &mDirWatch, SIGNAL( deleted(const QString&) ), SLOT( fileChanged() ) ); 95 connect( &mDirWatch, SIGNAL( deleted(const QString&) ), SLOT( fileChanged() ) );
95 96
96 //US opie addressbook is always readonly
97//US setReadOnly( true );
98 97
99 setFileName( fileName ); 98 setFileName( fileName );
100 99
@@ -371,6 +370,13 @@ void ResourceOpie::fileChanged()
371 // we are fully constructed 370 // we are fully constructed
372 if (!addressBook()) 371 if (!addressBook())
373 return; 372 return;
373
374 QString text( i18n( "Opie resource '%1'<br> has been changed by third party.<br>Do you want to reload?").arg( mFileName ) );
375 if ( readOnly() || KMessageBox::questionYesNo( 0, text ) == KMessageBox::Yes ) {
376 load();
377 addressBook()->emitAddressBookChanged();
378 }
379
374 load(); 380 load();
375 addressBook()->emitAddressBookChanged(); 381 addressBook()->emitAddressBookChanged();
376} 382}