After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 78514 - copy item in edit menu
copy item in edit menu
Status: RESOLVED FIXED
Product: eog
Classification: Core
Component: general
2.19.x
Other other
: Low enhancement
: ---
Assigned To: EOG Maintainers
EOG Maintainers
: 172917 301367 628979 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2002-04-12 12:50 UTC by Jens Finke
Modified: 2011-06-17 11:02 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
mod to add 2 new menu items: copy image (to clipboard) and copy path. added both to both the Edit menu and the right-click menu. patch -p 2 (4.00 KB, patch)
2010-12-30 17:05 UTC, Adrian Hands
reviewed Details | Review

Description Jens Finke 2002-04-12 12:50:41 UTC
It would be nice to have a copy menuitem in the edit dialog to transfer the
current loaded image into the clipboard.
Comment 1 Jens Finke 2002-04-12 12:51:41 UTC
Of course I mean a copy menuitem in the edit _menu_.
Comment 2 Federico Mena Quintero 2002-04-25 21:12:32 UTC
What selection type would we use?
Comment 3 Gregory Merchan 2002-06-16 12:19:45 UTC
Support as many targets as you can.
All of these seem to make sense (assuming you want to handle the
encodings):
 ADOBE_PORTABLE_DOCUMENT_FORMAT
 APPLE_PICT
 BITMAP
 ENCAPSULATED_POSTSCRIPT
 ENCAPSULATED_POSTSCRIPT_INTERCHANGE
 FILE_NAME
 PIXMAP
 POSTSCRIPT

The mime-type targets of XDnD would be good too.
Comment 4 Federico Mena Quintero 2002-07-29 21:02:42 UTC
But would it be useful at all?  E.g. which applications will take a Paste?
Comment 5 Alan Horkan 2003-07-24 20:01:16 UTC
This would be useful, someone has got to be the first to post stuff to
the clipboard then we can kick ass and tell other applications to wake
up and paste it.  

I almost always Cut rather than Copy, particularly using the keyboard
shortcut Ctrl+X it would be very helpful if Ctrl+X could also work
even if all does is to Copy.  

Any chance of getting this for Gnome 2.6?  
Optimistically added the Target milestone of 2.x
Comment 6 Alan Horkan 2004-08-31 14:39:54 UTC
> which applications will take a Paste?

gimp and abiword have made progress at cut and paste between applications
Comment 7 Muthiah Annamalai 2005-03-12 22:06:13 UTC
Lets see if I can do something. Im taking this case.. ;-|
Comment 8 Jens Finke 2005-04-07 10:37:32 UTC
*** Bug 172917 has been marked as a duplicate of this bug. ***
Comment 9 Jens Finke 2005-04-21 06:39:04 UTC
*** Bug 301367 has been marked as a duplicate of this bug. ***
Comment 10 Emmanuel Touzery 2005-04-21 06:56:17 UTC
#301367 has been marked duplicate of this, but I asked more for a PASTE item
than copy in #301367, giving the test-case of pictures embedded in a openoffice
document, that can only be gotten out of the document by copying them in the
clipboard (and then i only found gimp to paste them, which is not handy for
beginners IMHO).
that action is not impossible today, but due to gimp, too hard, I thought.
Comment 11 Lucas Rocha 2005-10-30 02:12:03 UTC
Updating version to development series 2.13.x.
Comment 12 Paul Sladen 2010-07-14 18:43:13 UTC
Ubuntu report:

  http://launchpad.net/bugs/604294
  "Should provide Edit->Copy to clipboard for images"

Turns out that Gthumb has exactly the same deficiency!...
Comment 13 Felix Riemann 2010-09-07 20:32:02 UTC
*** Bug 628979 has been marked as a duplicate of this bug. ***
Comment 14 David Richards 2010-09-07 21:06:03 UTC
In the time since this bug was created (sorry for the dupe), many applications will accept a paste.  Pastes from EOG to Evolution and OpenOffice would be used heavily by our users.
Comment 15 Adrian Hands 2010-12-30 17:05:45 UTC
Created attachment 177268 [details] [review]
mod to add 2 new menu items: copy image (to clipboard) and copy path.  added both to both the Edit menu and the right-click menu.

patch -p 2
Comment 16 Felix Riemann 2010-12-31 13:31:30 UTC
Review of attachment 177268 [details] [review]:

Are you sure the patch is complete? There seems to be a cut-off chunk at the end of your submitted patch.

In general the patch seems to be okay and I am thinking about committing it to our code repository.
Yet I'd like to explore the possibility of having a single "Copy" menu entry first.

::: BUILD/eog-2.32.0.orig/src/eog-window.c
@@ +3642,3 @@
+	g_return_if_fail (EOG_IS_IMAGE (image));
+
+	pix = eog_image_get_pixbuf(image);

There's a little race condition here. eog_image_get_pixbuf() doesn't guarantee that the image is actually loaded and available (a problem we have in other occassions as well). So while the image is loading (which it likely is since it is the first selected one) _get_pixbuf can return NULL.

I'm not sure how to get around this nicely right now, though.

@@ +4068,3 @@
+	{ "CopyImage", NULL, N_("Copy _Pats"), NULL,
+	  N_("Copy the image to the clipboard"),
+	  G_CALLBACK (eog_window_cmd_copy_image) },

I think these actions are not needed if you have the EditCopy* actions already.
Comment 17 Felix Riemann 2010-12-31 17:42:06 UTC
Okay, I extended your patch to work with a single menu entry. Thanks, Adrian.
The race condition is not really workaroundable at the moment and needs a rework in the job system. The extended code simply copies to the clipboard what is available (if the pixbuf is not available yet it's just the URI).

Have a nice new year, folks!

commit 031908baeeac94a398e44e53253ee8454f834242
Author: Felix Riemann <>
Date:   Fri Dec 31 18:30:12 2010 +0100

    Unite copy to clipboard functions in a single menu entry
    
    Also assign a shortcut and icon to it.

commit dcb56b03e9c9282138b9da94eddcedfc401ab750
Author: Felix Riemann <>
Date:   Fri Dec 31 18:21:45 2010 +0100

    Allow handling multiple clipboard data formats from one menu entry
    
    The new class "snapshots" the required data from the given EogImage
    and keeps it around for clipboard usage until the clipboard gets reset.

commit 0b209b1ff16e863e60a1d86413aa57c5fbde76b0
Author: Adrian Hands <>
Date:   Fri Dec 31 14:34:58 2010 +0100

    Add Copy Image and Copy Path to clipboard functionality
    
    Fixes bug 78514.

This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
Comment 18 Claudio Saavedra 2010-12-31 18:03:58 UTC
Great work guys, thank you a lot!
Comment 19 Ian Hands 2011-02-04 01:47:30 UTC
I would like to extend my thanks to the gnome team/community for a great last moment with my dad.

Adrian Hands (my father) wrote the patch above to improve the usability of gnome for himself and others. You see my dad was suffering from ALS and his hands were so crippled he could no longer use a keyboard. Thus we used a Darci usb morse code keyboard emulator to help him type. Even the morse code device was a struggle as the sensitivity adjustment and positioning of the nice two paddled key would fall out of whack. I rigged up a pvc cage that wrapped around his knee and fixed remote switches to the cage so that he could use the remaining strength in his legs to operate the Darci morse code device. He used this last bit of body movement to write this patch.

Here is a photo of him using it: https://picasaweb.google.com/HandsAdrian/ShotwellConnect#5549467460761802914

My father passed away yesterday. I went back through my email to find our last correspondence (he was in India for treatment, and I live in Raleigh). I would like to share the email with you.
<email>
On Sun, Jan 30, 2011 at 12:16 PM, Adrian Hands <handsadrian@gmail.com> wrote:
> ACCEPTed
> COMMITed
> RESOLVEd
> BOO-YAH!
>
> commit 0b209b1ff16e863e60a1d86413aa57c5fbde76b0
> Author: Adrian Hands <handsadrian@gmail.com>
> Date:   Fri Dec 31 14:34:58 2010 +0100
>
>    Add Copy Image and Copy Path to clipboard functionality
>
>    Fixes bug 78514.
>
>  data/eog-ui.xml  |    9 +++++++
>  src/eog-window.c |   63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 72 insertions(+), 0 deletions(-)

I have the coolest Dad in the world!
</email>

I am so glad that my last comment to my Dad was something like this.

Adrian Hands loved free software / open source. I do as well.

Thanks so much for the great software, and a new great memory.
-Ian Page Hands
Comment 20 Claudio Saavedra 2011-02-26 17:11:00 UTC
Ian, I am really touched to hear your father's story and at the same time honored to know that he gave us this wonderful contribution. Please know that we are more than grateful to your father and that his contribution and memory will live with this project, forever.

My sympathies,

Claudio (eog maintainer)
Comment 21 iced 2011-06-09 09:13:11 UTC
谢谢你,谢谢你的父亲。他将被永远记住。

-Iced
Comment 22 chenziteng 2011-06-17 11:02:57 UTC
Hi,

Just want to show my respect to the great programmer, "Old soldiers never die, they just fade away".

Regards

Ziteng Chen