summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/plugins/dir/resourcedir.cpp10
-rw-r--r--kabc/plugins/file/resourcefile.cpp10
-rw-r--r--kabc/plugins/opie/resourceopie.cpp12
-rw-r--r--kabc/plugins/qtopia/resourceqtopia.cpp9
-rw-r--r--kaddressbook/details/detailsviewcontainer.cpp3
-rw-r--r--kaddressbook/kabcore.cpp1
6 files changed, 33 insertions, 12 deletions
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
@@ -46,2 +46,3 @@ $Id$
46#include <kurlrequester.h> 46#include <kurlrequester.h>
47#include <kmessagebox.h>
47 48
@@ -56,4 +57,2 @@ $Id$
56#include <qdir.h> 57#include <qdir.h>
57//US #include "../../formats/vcardformatplugin2.h"
58//US #include "../../formats/binaryformat.h"
59 58
@@ -347,4 +346,7 @@ void ResourceDir::pathChanged()
347 346
348 load(); 347 QString text( i18n( "Dir resource '%1'<br> has been changed by third party.<br>Do you want to reload?").arg( mPath ) );
349 addressBook()->emitAddressBookChanged(); 348 if ( readOnly() || KMessageBox::questionYesNo( 0, text ) == KMessageBox::Yes ) {
349 load();
350 addressBook()->emitAddressBookChanged();
351 }
350} 352}
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
@@ -44,2 +44,3 @@ $Id$
44#include <kstandarddirs.h> 44#include <kstandarddirs.h>
45#include <kmessagebox.h>
45 46
@@ -374,4 +375,9 @@ void ResourceFile::fileChanged()
374 return; 375 return;
375 load(); 376
376 addressBook()->emitAddressBookChanged(); 377
378 QString text( i18n( "File resource '%1'<br> has been changed by third party.<br>Do you want to reload?").arg( mFileName ) );
379 if ( readOnly() || KMessageBox::questionYesNo( 0, text ) == KMessageBox::Yes ) {
380 load();
381 addressBook()->emitAddressBookChanged();
382 }
377} 383}
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
@@ -42,2 +42,3 @@ $Id$
42#include <kstandarddirs.h> 42#include <kstandarddirs.h>
43#include <kmessagebox.h>
43 44
@@ -94,5 +95,3 @@ void ResourceOpie::init( const QString &fileName )
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
@@ -373,2 +372,9 @@ void ResourceOpie::fileChanged()
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();
diff --git a/kabc/plugins/qtopia/resourceqtopia.cpp b/kabc/plugins/qtopia/resourceqtopia.cpp
index 4854197..7475685 100644
--- a/kabc/plugins/qtopia/resourceqtopia.cpp
+++ b/kabc/plugins/qtopia/resourceqtopia.cpp
@@ -42,2 +42,3 @@ $Id$
42#include <kstandarddirs.h> 42#include <kstandarddirs.h>
43#include <kmessagebox.h>
43 44
@@ -337,4 +338,8 @@ void ResourceQtopia::fileChanged()
337 return; 338 return;
338 load(); 339
339 addressBook()->emitAddressBookChanged(); 340 QString text( i18n( "Qtopia resource '%1'<br> has been changed by third party.<br>Do you want to reload?").arg( mFileName ) );
341 if ( readOnly() || KMessageBox::questionYesNo( 0, text ) == KMessageBox::Yes ) {
342 load();
343 addressBook()->emitAddressBookChanged();
344 }
340} 345}
diff --git a/kaddressbook/details/detailsviewcontainer.cpp b/kaddressbook/details/detailsviewcontainer.cpp
index 8f566cf..a42499f 100644
--- a/kaddressbook/details/detailsviewcontainer.cpp
+++ b/kaddressbook/details/detailsviewcontainer.cpp
@@ -136,4 +136,5 @@ void ViewContainer::refreshView()
136{ 136{
137 if ( mCurrentLook ) 137 if ( mCurrentLook ) {
138 mCurrentLook->setAddressee( mCurrentAddressee ); 138 mCurrentLook->setAddressee( mCurrentAddressee );
139 }
139} 140}
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 2b07541..a7ca0ce 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -1126,2 +1126,3 @@ void KABCore::addressBookChanged()
1126 mViewManager->refreshView(); 1126 mViewManager->refreshView();
1127// mDetails->refreshView();
1127 1128