author | zautrix <zautrix> | 2004-07-04 13:45:40 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-07-04 13:45:40 (UTC) |
commit | dd549dd992f914d30c39c6c85297d689b9ac6308 (patch) (side-by-side diff) | |
tree | d2e78db8523e169f0d4c0519a854ec1791964c23 | |
parent | f469d0adf4876004eab694cfc62f0ce7319677cd (diff) | |
download | kdepimpi-dd549dd992f914d30c39c6c85297d689b9ac6308.zip kdepimpi-dd549dd992f914d30c39c6c85297d689b9ac6308.tar.gz kdepimpi-dd549dd992f914d30c39c6c85297d689b9ac6308.tar.bz2 |
For better useage on the 5500, the preferred email has to be displayed topmost
-rw-r--r-- | libkdepim/addresseeview.cpp | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/libkdepim/addresseeview.cpp b/libkdepim/addresseeview.cpp index 70fc57c..71c7817 100644 --- a/libkdepim/addresseeview.cpp +++ b/libkdepim/addresseeview.cpp @@ -85,4 +85,19 @@ 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( + "<tr><td align=\"right\"><b>%1</b></td>" + "<td align=\"left\"><a href=\"mailto:%2 <%3> \">%4</a></td></tr>" ) + .arg( type ) + .arg( name ) + .arg( *emailIt ) + .arg( *emailIt ); + ++emailIt; + } + KABC::PhoneNumber::List phones = mAddressee.phoneNumbers(); KABC::PhoneNumber::List::ConstIterator phoneIt; @@ -95,8 +110,6 @@ void AddresseeView::setAddressee( const KABC::Addressee& addr ) } - 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( "<tr><td align=\"right\"><b>%1</b></td>" @@ -106,5 +119,4 @@ void AddresseeView::setAddressee( const KABC::Addressee& addr ) .arg( *emailIt ) .arg( *emailIt ); - type = i18n( "Other" ); } @@ -150,5 +162,5 @@ void AddresseeView::setAddressee( const KABC::Addressee& addr ) notes = QString( "<tr>" - "<td align=\"right\" valign=\"top\"><b>%1:</b></td>" // note label + "<td align=\"right\" valign=\"top\"><b>%1</b></td>" // note label "<td align=\"left\">%2</td>" // note "</tr>" ).arg( i18n( "Notes" ) ) |