[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdepim/kaddressbook
From:       Tobias Koenig <tokoe () kde ! org>
Date:       2005-03-25 16:10:34
Message-ID: 20050325161034.A03DA48F () office ! kde ! org
[Download RAW message or body]

CVS commit by tokoe: 

Fixed #96803

BUGS:96803


  M +11 -3     kabcore.cpp   1.152


--- kdepim/kaddressbook/kabcore.cpp  #1.151:1.152
@@ -467,11 +467,19 @@ void KABCore::mergeContacts()
 
   KABC::Addressee::List::Iterator it = list.begin();
+  KABC::Addressee origAddr = *it;
+  QString uids;
   ++it;
   while ( it != list.end() ) {
-    mAddressBook->removeAddressee( *it );
+    uids.append( (*it).uid() );
     ++it;
   }
 
-  mAddressBook->insertAddressee( addr );
+  PwDeleteCommand *command = new PwDeleteCommand( mAddressBook, uids );
+  UndoStack::instance()->push( command );
+  RedoStack::instance()->clear();
+
+  PwEditCommand *editCommand = new PwEditCommand( mAddressBook, origAddr, addr );
+  UndoStack::instance()->push( editCommand );
+  RedoStack::instance()->clear();
 
   mSearchManager->reload();
@@ -1059,5 +1067,5 @@ void KABCore::initActions()
 
   if ( mIsPart )
-    action = new KAction( i18n( "&Configure KAddressBook..." ), "configure", 0,
+    action = new KAction( i18n( "&Configure Address Book..." ), "configure", 0,
                           this, SLOT( configure() ), actionCollection(),
                           "kaddressbook_configure" );


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic