From dd549dd992f914d30c39c6c85297d689b9ac6308 Mon Sep 17 00:00:00 2001 From: zautrix Date: Sun, 04 Jul 2004 13:45:40 +0000 Subject: For better useage on the 5500, the preferred email has to be displayed topmost --- diff --git a/libkdepim/addresseeview.cpp b/libkdepim/addresseeview.cpp index 70fc57c..71c7817 100644 --- a/libkdepim/addresseeview.cpp +++ b/libkdepim/addresseeview.cpp @@ -84,6 +84,21 @@ void AddresseeView::setAddressee( const KABC::Addressee& addr ) QString dynamicPart; + QStringList emails = mAddressee.emails(); + QStringList::ConstIterator emailIt; + QString type = i18n( "Email" ); + emailIt = emails.begin(); + if ( emailIt != emails.end() ) { + dynamicPart += QString( + "%1" + " \">%4" ) + .arg( type ) + .arg( name ) + .arg( *emailIt ) + .arg( *emailIt ); + ++emailIt; + } + KABC::PhoneNumber::List phones = mAddressee.phoneNumbers(); KABC::PhoneNumber::List::ConstIterator phoneIt; for ( phoneIt = phones.begin(); phoneIt != phones.end(); ++phoneIt ) { @@ -94,10 +109,8 @@ void AddresseeView::setAddressee( const KABC::Addressee& addr ) .arg( (*phoneIt).number() ); } - QStringList emails = mAddressee.emails(); - QStringList::ConstIterator emailIt; - QString type = i18n( "Email" ); - for ( emailIt = emails.begin(); emailIt != emails.end(); ++emailIt ) { + + for ( ; emailIt != emails.end(); ++emailIt ) { dynamicPart += QString( "%1" " \">%4" ) @@ -105,7 +118,6 @@ void AddresseeView::setAddressee( const KABC::Addressee& addr ) .arg( name ) .arg( *emailIt ) .arg( *emailIt ); - type = i18n( "Other" ); } if ( !mAddressee.url().url().isEmpty() ) { @@ -149,7 +161,7 @@ void AddresseeView::setAddressee( const KABC::Addressee& addr ) if ( !mAddressee.note().isEmpty() ) { notes = QString( "" - "%1:" // note label + "%1" // note label "%2" // note "" ).arg( i18n( "Notes" ) ) //US .arg( mAddressee.note().replace( '\n', "
" ) ); -- cgit v0.9.0.2