[Kde-pim] Review Request 112552: kaddressbook contact display: make it possible to easily copy an item's text

Jonathan Marten jjm at keelhaul.me.uk
Fri Sep 6 11:01:25 BST 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/112552/
-----------------------------------------------------------

Review request for KDEPIM-Libraries.


Description
-------

In the contact display, the context menu over an item which is an email address allows the address to be copied easily using the "Copy e-mail address" action.  But, for any other sort of information, the action is not available - all that can be done is to select the item (which requires precise mouse movement) and then use the standard "Copy" action.

This change allows the text of any item to be copied.  Email addresses work as before.  For an external link (e.g. Homepage), the URL is copied and the action says "Copy Link URL".  For any other item, it is copied in text form and the action says "Copy Item".

There are some hacks in the code to properly handle certain items.  Anything formatted over multiple lines (e.g. addresses) needs to have the Unicode line separator characters as returned converted back to '\n'.  The suffix link "(SMS)" added to a mobile number is removed.  There is nothing meaningful to copy for a popup over the photo image, so this is suppressed.

The "Select All" action is pointless here, so it is removed from the popup menu.

There is an anomaly in the operation in that a click in the first column (the item keys) copies the text of the key, not its value.  I can't currently see a way around this apart from specially formatting the generated HTML, which would place restrictions on user-provided or GHNS templates.


Diffs
-----

  akonadi/contact/textbrowser.cpp c2daed9 
  akonadi/contact/textbrowser_p.h fdf79e2 

Diff: http://git.reviewboard.kde.org/r/112552/diff/


Testing
-------

Built kdepimlibs and kaddressbook with these changes.  Verified the correct naming and enabling of the action, and that the correct information is copied, over all parts of the contact display.


Thanks,

Jonathan Marten

_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list