summaryrefslogtreecommitdiffabout
path: root/kaddressbook/kabcore.cpp
Side-by-side diff
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()
void KABCore::deleteContacts( const QStringList &uids )
{
+
if ( uids.count() > 0 ) {
+
+ if ( KABPrefs::instance()->mAskForDelete ) {
+ int count = uids.count();
+ if ( count > 5 ) count = 5;
+ QString cNames;
+ int i;
+ for ( i = 0; i < count ; ++i ) {
+ cNames += KGlobal::formatMessage( mAddressBook->findByUid( uids[i] ).realName() ,0) + "\n";
+ }
+ if ( uids.count() > 5 )
+ cNames += i18n("...and %1 more\ncontact(s) selected").arg( uids.count() - 5 );
+ QString text = i18n( "Do you really\nwant to delete the\nsetected contact(s)?\n\n" ) + cNames ;
+ if ( KMessageBox::questionYesNo( this, text ) != KMessageBox::Yes )
+ return;
+ }
PwDeleteCommand *command = new PwDeleteCommand( mAddressBook, uids );
UndoStack::instance()->push( command );
RedoStack::instance()->clear();
@@ -1098,7 +1114,7 @@ void KABCore::setWhoAmI()
}
QString text( i18n( "<qt>Do you really want to use <b>%1</b> as your new personal contact?</qt>" ) );
- if ( KMessageBox::questionYesNo( this, text.arg( addrList[ 0 ].assembledName() ) ) == KMessageBox::Yes )
+ if ( KMessageBox::questionYesNo( this, text.arg( addrList[ 0 ].realName() ) ) == KMessageBox::Yes )
static_cast<KABC::StdAddressBook*>( KABC::StdAddressBook::self() )->setWhoAmI( addrList[ 0 ] );
}
void KABCore::editCategories()
@@ -2666,7 +2682,7 @@ void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString
anniversaryList.append(anni); //should be ISODate
realNameList.append((*it).realName());
preferredEmailList.append((*it).preferredEmail());
- assembledNameList.append((*it).assembledName());
+ assembledNameList.append((*it).realName());
uidList.append((*it).uid());
//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() );