kaddressbook contact display: make it possible to easily copy an item's text

Review Request #112552 - Created Sept. 6, 2013 and submitted

Information
Jonathan Marten
kdepimlibs
Reviewers
kdepimlibs
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.
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.

Issues

  • 0
  • 1
  • 0
  • 1
Description From Last Updated
Kevin Krammer
Jonathan Marten
Kevin Krammer
Jonathan Marten
Kevin Krammer
Jonathan Marten
Kevin Krammer
Jonathan Marten
Kevin Krammer
Jonathan Marten
Kevin Krammer
Commit Hook
Jonathan Marten
Review request changed

Status: Closed (submitted)

Loading...