summaryrefslogtreecommitdiffabout
path: root/kaddressbook/kabcore.cpp
Unidiff
Diffstat (limited to 'kaddressbook/kabcore.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp21
1 files changed, 15 insertions, 6 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 8daca33..2b07541 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -1097,28 +1097,38 @@ void KABCore::configurationChanged()
1097{ 1097{
1098 mExtensionManager->reconfigure(); 1098 mExtensionManager->reconfigure();
1099} 1099}
1100 1100
1101void KABCore::addressBookChanged() 1101void KABCore::addressBookChanged()
1102{ 1102{
1103#ifndef KAB_EMBEDDED 1103/*US
1104 QDictIterator<AddresseeEditorDialog> it( mEditorDict ); 1104 QDictIterator<AddresseeEditorDialog> it( mEditorDict );
1105 while ( it.current() ) { 1105 while ( it.current() ) {
1106 if ( it.current()->dirty() ) { 1106 if ( it.current()->dirty() ) {
1107 QString text = i18n( "Data has been changed externally. Unsaved " 1107 QString text = i18n( "Data has been changed externally. Unsaved "
1108 "changes will be lost." ); 1108 "changes will be lost." );
1109 KMessageBox::information( this, text ); 1109 KMessageBox::information( this, text );
1110 } 1110 }
1111 it.current()->setAddressee( mAddressBook->findByUid( it.currentKey() ) ); 1111 it.current()->setAddressee( mAddressBook->findByUid( it.currentKey() ) );
1112 ++it; 1112 ++it;
1113 } 1113 }
1114 1114*/
1115 if (mEditorDialog)
1116 {
1117 if (mEditorDialog->dirty())
1118 {
1119 QString text = i18n( "Data has been changed externally. Unsaved "
1120 "changes will be lost." );
1121 KMessageBox::information( this, text );
1122 }
1123 QString currentuid = mEditorDialog->addressee().uid();
1124 mEditorDialog->setAddressee( mAddressBook->findByUid( currentuid ) );
1125 }
1115 mViewManager->refreshView(); 1126 mViewManager->refreshView();
1116#else //KAB_EMBEDDED 1127
1117 qDebug("KABCore::addressBookChanged() finsih method"); 1128
1118#endif //KAB_EMBEDDED
1119} 1129}
1120 1130
1121AddresseeEditorDialog *KABCore::createAddresseeEditorDialog( QWidget *parent, 1131AddresseeEditorDialog *KABCore::createAddresseeEditorDialog( QWidget *parent,
1122 const char *name ) 1132 const char *name )
1123{ 1133{
1124 1134
@@ -1135,13 +1145,12 @@ AddresseeEditorDialog *KABCore::createAddresseeEditorDialog( QWidget *parent,
1135 1145
1136 return mEditorDialog; 1146 return mEditorDialog;
1137} 1147}
1138 1148
1139void KABCore::slotEditorDestroyed( const QString &uid ) 1149void KABCore::slotEditorDestroyed( const QString &uid )
1140{ 1150{
1141 qDebug("KABCore::slotEditorDestroyed called. maybe a problem! ");
1142 //mEditorDict.remove( uid ); 1151 //mEditorDict.remove( uid );
1143} 1152}
1144 1153
1145void KABCore::initGUI() 1154void KABCore::initGUI()
1146{ 1155{
1147#ifndef KAB_EMBEDDED 1156#ifndef KAB_EMBEDDED