summaryrefslogtreecommitdiffabout
path: root/kaddressbook/kabcore.cpp
Unidiff
Diffstat (limited to 'kaddressbook/kabcore.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index d5de9cb..b9830b1 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -1028,7 +1028,23 @@ void KABCore::deleteContacts()
1028 1028
1029void KABCore::deleteContacts( const QStringList &uids ) 1029void KABCore::deleteContacts( const QStringList &uids )
1030{ 1030{
1031
1031 if ( uids.count() > 0 ) { 1032 if ( uids.count() > 0 ) {
1033
1034 if ( KABPrefs::instance()->mAskForDelete ) {
1035 int count = uids.count();
1036 if ( count > 5 ) count = 5;
1037 QString cNames;
1038 int i;
1039 for ( i = 0; i < count ; ++i ) {
1040 cNames += KGlobal::formatMessage( mAddressBook->findByUid( uids[i] ).realName() ,0) + "\n";
1041 }
1042 if ( uids.count() > 5 )
1043 cNames += i18n("...and %1 more\ncontact(s) selected").arg( uids.count() - 5 );
1044 QString text = i18n( "Do you really\nwant to delete the\nsetected contact(s)?\n\n" ) + cNames ;
1045 if ( KMessageBox::questionYesNo( this, text ) != KMessageBox::Yes )
1046 return;
1047 }
1032 PwDeleteCommand *command = new PwDeleteCommand( mAddressBook, uids ); 1048 PwDeleteCommand *command = new PwDeleteCommand( mAddressBook, uids );
1033 UndoStack::instance()->push( command ); 1049 UndoStack::instance()->push( command );
1034 RedoStack::instance()->clear(); 1050 RedoStack::instance()->clear();
@@ -1098,7 +1114,7 @@ void KABCore::setWhoAmI()
1098 } 1114 }
1099 1115
1100 QString text( i18n( "<qt>Do you really want to use <b>%1</b> as your new personal contact?</qt>" ) ); 1116 QString text( i18n( "<qt>Do you really want to use <b>%1</b> as your new personal contact?</qt>" ) );
1101 if ( KMessageBox::questionYesNo( this, text.arg( addrList[ 0 ].assembledName() ) ) == KMessageBox::Yes ) 1117 if ( KMessageBox::questionYesNo( this, text.arg( addrList[ 0 ].realName() ) ) == KMessageBox::Yes )
1102 static_cast<KABC::StdAddressBook*>( KABC::StdAddressBook::self() )->setWhoAmI( addrList[ 0 ] ); 1118 static_cast<KABC::StdAddressBook*>( KABC::StdAddressBook::self() )->setWhoAmI( addrList[ 0 ] );
1103} 1119}
1104void KABCore::editCategories() 1120void KABCore::editCategories()
@@ -2666,7 +2682,7 @@ void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString
2666 anniversaryList.append(anni); //should be ISODate 2682 anniversaryList.append(anni); //should be ISODate
2667 realNameList.append((*it).realName()); 2683 realNameList.append((*it).realName());
2668 preferredEmailList.append((*it).preferredEmail()); 2684 preferredEmailList.append((*it).preferredEmail());
2669 assembledNameList.append((*it).assembledName()); 2685 assembledNameList.append((*it).realName());
2670 uidList.append((*it).uid()); 2686 uidList.append((*it).uid());
2671 2687
2672 //qDebug("found birthday in KA/Pi: %s,%s,%s,%s: %s, %s", (*it).realName().latin1(), (*it).preferredEmail().latin1(), (*it).assembledName().latin1(), (*it).uid().latin1(), formattedbday.latin1(), anni.latin1() ); 2688 //qDebug("found birthday in KA/Pi: %s,%s,%s,%s: %s, %s", (*it).realName().latin1(), (*it).preferredEmail().latin1(), (*it).assembledName().latin1(), (*it).uid().latin1(), formattedbday.latin1(), anni.latin1() );