Copy email address from user list

Bug #473205 reported by Francois Botha
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
LinuxDC++
Confirmed
Wishlist
Unassigned

Bug Description

Please enable the copying of other fields (except nicknames) on the user list to the clipboard. I'm especially interested in the email address field.

See https://answers.launchpad.net/linuxdcpp/+question/85735 for original question.

Revision history for this message
Razzloss (razzloss) wrote :

If this is implemented maybe there should be Copy (instead of current copy nick) sub-menu in the context menu which would list all the fields for individual copy and an option which would copy the whole row.

--RZ

Changed in linuxdcpp:
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Steven Sheehy (steven-sheehy) wrote :

I agree with Razzloss and that's also what DC++ has for their user list. However, I would like to also investigate whether it's possible to enable copying individual cells directly from the tree view via ctrl+c without having to go through the popup menu.

Revision history for this message
Francois Botha (igitur) wrote :

Anything I can do to help with this? At the moment I have to open Valknut to copy the information.

Revision history for this message
Steven Sheehy (steven-sheehy) wrote :

We're focused on i18n and getting 1.1.0 out the door at the moment. We'd be happy to assist you in developing your own fix for this if you'd like. You can ask us questions here or join our irc chatroom.

Revision history for this message
Francois Botha (igitur) wrote :

Ok, I'll try to work on a fix. What do you want the Ctrl-C action to be? Copy the entire row with Tab characters between the "cells"? I'll look at what Valknut does exactly too.

Revision history for this message
Steven Sheehy (steven-sheehy) wrote :

What exactly is your use case? Obviously you want to copy some text, but what are you doing with that text? For example, if you're copying a user's email address and then emailing them, wouldn't it make more sense to add a "Email user" menu item instead of a copy email menu item?

If you just need the text then, as Razzloss mentioned, preferably we'd have a copy sub-menu which dynamically iterates through the treeview columns and shows a menu item for each that allows it to be copied. This functionality could even be integrated into treeview.hh so that all treeviews can have dynamic copy sub-menus.

Revision history for this message
Francois Botha (igitur) wrote :

Ok, my full use case:
We have a 18TB share on DC. It's too large to just browse around to see what's new, so I've written 'n DCComparer app that parses the .xml.bz2 files, imports it to a .sqlite file and does a comparison with the previous week's import. I generate a report of the new files based on that.

I keep a distribution list of all our DC users on Gmail. I'm not part of the admin team, so I don't get notified when they add new users. Every week I go onto DC, copy the active users' email address (with Valknut), and import them into my distribution list (most are ignored because they already exist).

Then I email (BCC) the report out to everybody.

Revision history for this message
Steven Sheehy (steven-sheehy) wrote :

Ok, sounds like you have a pretty unique use case that will only be fixed by a copy sub-menu.

Revision history for this message
Francois Botha (igitur) wrote :

Here is my first attempt at a patch for this issue. Be gentle. I'm still learning.

Revision history for this message
Steven Sheehy (steven-sheehy) wrote :

Pretty good first attempt. Here's some gentle comments:

- The code looks pretty generalized, so it's not tied specifically to Hub which is good. This means this code could be abstracted out completely to TreeView. The only thing needed in Hub would be to add the copy sub menu to the regular popup menu (no glade needed). I would suggest calling some method like TreeView::addCopyMenu_gui(GtkWidget *menu) from Hub which would append a Copy menu item and its corresponding dynamically generated sub menu
- Moving to TreeView would also allow you to take advantage of the ColMap to iterate over
- I don't think you need TreeView::getFormattedText. TreeView::getString will automatically format the cell data into the correct text form. Unless you don't want the formatted text but you wanted the non-formatted text. For example, you don't want "3.36 GiB" you want the actual bytes 3608079887. Most of the times you want the formatted text.
- Instead of "Copy Row" it's probably better to put "All". Copy is implied by the menu title.
- The column separator should probably be configurable. Or at least a constant class variable so it's more easily changed.
- Use G_DIR_SEPARATOR for '\n'
- You might be able to abstract out the similar portions of onCopyDataItemClicked and onCopyRowClicked into a separate method.
- Use tabs only for indentation. I see some spaces mixed in.

Revision history for this message
Steven Sheehy (steven-sheehy) wrote :

Did I scare you away? :)

Revision history for this message
Francois Botha (igitur) wrote :

Hehe, no no. It's just a question of priorities. Will hopefully get round to this again soon.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.