[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
Sat Sep 14 08:41:41 BST 2013



> On Sept. 13, 2013, 2:24 p.m., Kevin Krammer wrote:
> > akonadi/contact/textbrowser.cpp, line 71
> > <http://git.reviewboard.kde.org/r/112552/diff/6/?file=189326#file189326line71>
> >
> >     hmm, since there is no action in the menu when this is defined, maybe move all code into the ifndef?
> >     i.e. not show a menu at all instead of an empty one?

Could do that, but if someone subsequently wanted to add a non-clipboard related action (i.e. one that shouldn't be suppressed by QT_NO_CLIPBOARD), it would have to be rearranged again.  OTOH, that isn't very likely.


- Jonathan


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


On Sept. 13, 2013, 2:04 p.m., Jonathan Marten wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/112552/
> -----------------------------------------------------------
> 
> (Updated Sept. 13, 2013, 2:04 p.m.)
> 
> 
> 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 6f856e4 
>   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