| Summary: | Kaddressbook contact IM address context menu | ||
|---|---|---|---|
| Product: | [Unmaintained] kab3 | Reporter: | Petr <my_linux_mailbox> |
| Component: | general | Assignee: | Tobias Koenig <tokoe> |
| Status: | RESOLVED UNMAINTAINED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | unspecified | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Petr
2007-02-07 16:25:05 UTC
SVN commit 633250 by tokoe:
Move the IM Address field into the IM section, so it's shown when you enable the
'Show IM Addresses' option.
BUG:141339
M +32 -25 addresseeview.cpp
--- branches/KDE/3.5/kdepim/libkdepim/addresseeview.cpp #633249:633250
@@ -364,7 +364,6 @@
titleMap.insert( "ManagersName", i18n( "Manager's Name" ) );
titleMap.insert( "SpousesName", i18n( "Partner's Name" ) );
titleMap.insert( "Office", i18n( "Office" ) );
- titleMap.insert( "IMAddress", i18n( "IM Address" ) );
titleMap.insert( "Anniversary", i18n( "Anniversary" ) );
}
@@ -382,8 +381,8 @@
QString key = customEntry.left( pos );
const QString value = customEntry.mid( pos + 1 );
- // blog is handled separated
- if ( key == "BlogFeed" )
+ // blog and im address is handled separated
+ if ( key == "BlogFeed" || key == "IMAddress" )
continue;
const QMap<QString, QString>::ConstIterator keyIt = titleMap.find( key );
@@ -400,30 +399,38 @@
QString role( addr.role() );
QString organization( addr.organization() );
- if ( proxy && (fieldMask & IMFields) ) {
- if ( proxy->isPresent( addr.uid() ) && proxy->presenceNumeric( addr.uid() ) > 0 ) {
- // set image source to either a QMimeSourceFactory key or a data:/ URL
- QString imgSrc;
- if ( internalLoading ) {
- imgSrc = QString::fromLatin1( "im_status_%1_image").arg( addr.uid() );
- QMimeSourceFactory::defaultFactory()->setPixmap( imgSrc, proxy->presenceIcon( addr.uid() ) );
- } else
- imgSrc = pixmapAsDataUrl( proxy->presenceIcon( addr.uid() ) );
+ if ( fieldMask & IMFields ) {
- // make the status a link, if required
- QString imStatus;
- if ( linkMask & IMLinks )
- imStatus = QString::fromLatin1( "<a href=\"im:\"><img src=\"%1\"> (%2)</a>" );
- else
- imStatus = QString::fromLatin1( "<img src=\"%1\"> (%2)" );
+ const QString imAddress = addr.custom( "KADDRESSBOOK", "X-IMAddress" );
+ if ( !imAddress.isEmpty() ) {
+ customData += rowFmtStr.arg( i18n( "IM Address" ) ).arg( imAddress ) ;
+ }
- // append our status to the rest of the dynamic part of the addressee
- dynamicPart += rowFmtStr
- .arg( i18n( "Presence" ) )
- .arg( imStatus
- .arg( imgSrc )
- .arg( proxy->presenceString( addr.uid() ) )
- );
+ if ( proxy ) {
+ if ( proxy->isPresent( addr.uid() ) && proxy->presenceNumeric( addr.uid() ) > 0 ) {
+ // set image source to either a QMimeSourceFactory key or a data:/ URL
+ QString imgSrc;
+ if ( internalLoading ) {
+ imgSrc = QString::fromLatin1( "im_status_%1_image").arg( addr.uid() );
+ QMimeSourceFactory::defaultFactory()->setPixmap( imgSrc, proxy->presenceIcon( addr.uid() ) );
+ } else
+ imgSrc = pixmapAsDataUrl( proxy->presenceIcon( addr.uid() ) );
+
+ // make the status a link, if required
+ QString imStatus;
+ if ( linkMask & IMLinks )
+ imStatus = QString::fromLatin1( "<a href=\"im:\"><img src=\"%1\"> (%2)</a>" );
+ else
+ imStatus = QString::fromLatin1( "<img src=\"%1\"> (%2)" );
+
+ // append our status to the rest of the dynamic part of the addressee
+ dynamicPart += rowFmtStr
+ .arg( i18n( "Presence" ) )
+ .arg( imStatus
+ .arg( imgSrc )
+ .arg( proxy->presenceString( addr.uid() ) )
+ );
+ }
}
}
The development of the old KAddressBook will be discontinued for KDE 4.4. Since the new application has the same name, but a completly new code base we close all bug reports against the old version and ask the submitters to resend there reports against the new product. |