Bug 68417 - dragging addresses from address book into kmail composer address fields pastes a vCardJu
Summary: dragging addresses from address book into kmail composer address fields paste...
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kab3
Classification: Miscellaneous
Component: general (show other bugs)
Version: 3.1
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Tobias Koenig
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-17 13:05 UTC by Oded Arbel
Modified: 2009-08-05 16:01 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 Oded Arbel 2003-11-17 13:05:41 UTC
Version:           3.1 (using KDE 3.1.93 (CVS >= 20031111), compiled sources)
Compiler:          gcc version 3.3.1 (Mandrake Linux 9.2 3.3.1-2mdk)
OS:          Linux (i686) release 2.4.21-3mdk

Just what the title says. I'd expect that if I have a mail composer open and I drag an address book entry into one of the composer's address fields, I'd get the main email address for that content.

Maybe this is a kmail bug ?

It would also be nice to be able to drag the email address off the "contact details" box.
Comment 1 Tobias Koenig 2003-11-19 12:33:52 UTC
Subject: kdepim/kaddressbook

CVS commit by tokoe: 

Use the email addresses in a QTextDrag and not the vCards. That fixes bug
#68417.

CCMAIL:68417-done@bugs.kde.org


  M +11 -0     addresseeutil.cpp   1.11
  M +16 -11    addresseeutil.h   1.5
  M +1 -1      viewmanager.cpp   1.99


--- kdepim/kaddressbook/addresseeutil.cpp  #1.10:1.11
@@ -43,2 +43,13 @@ KABC::Addressee::List AddresseeUtil::cli
   return tool.parseVCards( data );
 }
+
+QString AddresseeUtil::addresseesToEmails( const KABC::Addressee::List &addrList )
+{
+  QStringList emails;
+
+  KABC::Addressee::List::ConstIterator it;
+  for ( it = addrList.begin(); it != addrList.end(); ++it )
+    emails.append( (*it).fullEmail() );
+
+  return emails.join( "," );
+}

--- kdepim/kaddressbook/addresseeutil.h  #1.4:1.5
@@ -54,4 +54,9 @@ class AddresseeUtil
    static KABC::Addressee::List clipboardToAddressees( const QString &clipboard );
    
+    /**
+      Converts the list of addressee objects into a list of email addresses.
+     */
+    static QString addresseesToEmails( const KABC::Addressee::List &addrList );
+
   private:
     AddresseeUtil() {}

--- kdepim/kaddressbook/viewmanager.cpp  #1.98:1.99
@@ -422,5 +422,5 @@ void ViewManager::startDrag()
 
   KMultipleDrag *drag = new KMultipleDrag( this );
-  drag->addDragObject( new QTextDrag( AddresseeUtil::addresseesToClipboard( addrList ), this ) );
+  drag->addDragObject( new QTextDrag( AddresseeUtil::addresseesToEmails( addrList ), this ) );
 
   KABC::VCardTool tool;


Comment 2 Tobias Koenig 2009-08-05 16:01:34 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.