Bug 141339 - Kaddressbook contact IM address context menu
Summary: Kaddressbook contact IM address context menu
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kab3
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Tobias Koenig
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-07 16:25 UTC by Petr
Modified: 2009-08-05 16:32 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr 2007-02-07 16:25:05 UTC
Version:           3.5.6 (using KDE 3.5.6 "release 25.2" , openSUSE )
Compiler:          Target: x86_64-suse-linux
OS:                Linux (x86_64) release 2.6.18.2-34-default

When a contact is given an IM address it doesn't display it in the contact display panel on the right hand side unless "show custom fields" is selected.
To clarify, right-clicking on the display panel and selecting "Show Instant Messaging Addresses" has no effect.
However, right-clicking on the display panel and selecting "Show Custom Fields" does display the IM address. This is the case whether "show instant messaging addresses" is selected or not.
It's as if the index count for the context menu entries is out by a value of 1.
Comment 1 Tobias Koenig 2007-02-13 17:31:26 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() ) )
+                    );
+      }
     }
   }
 
Comment 2 Tobias Koenig 2009-08-05 16:32:26 UTC
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.