From d97d3b48d18b806b22b0e8d23e023fb4fc680600 Mon Sep 17 00:00:00 2001 From: Dave Neary Date: Wed, 14 May 2003 18:57:39 +0000 Subject: [PATCH] Attach default comment to image made by screenshot. Fixes bug #51164 2003-05-14 Dave Neary * plug-ins/common/screenshot.c: Attach default comment to image made by screenshot. Fixes bug #51164 --- ChangeLog | 5 +++++ plug-ins/common/screenshot.c | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/ChangeLog b/ChangeLog index 5b16915c6d..87aa51822c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-05-14 Dave Neary + + * plug-ins/common/screenshot.c: Attach default comment to + image made by screenshot. Fixes bug #51164 + 2003-05-14 Michael Natterer * app/core/Makefile.am diff --git a/plug-ins/common/screenshot.c b/plug-ins/common/screenshot.c index 002683b4c2..5e3662f848 100644 --- a/plug-ins/common/screenshot.c +++ b/plug-ins/common/screenshot.c @@ -320,12 +320,30 @@ shoot (void) if (image_ID != -1) { + GimpParasite *parasite; + gchar *comment; + /* figure out the monitor resolution and set the image to it */ gimp_get_monitor_resolution (&xres, &yres); gimp_image_set_resolution (image_ID, xres, yres); /* unset the image filename */ gimp_image_set_filename (image_ID, ""); + + + /* Set the default comment parasite */ + comment = gimp_get_default_comment (); + + if (comment != NULL) + { + parasite = gimp_parasite_new ("gimp-comment", + GIMP_PARASITE_PERSISTENT, + g_utf8_strlen (comment, -1) + 1, + comment); + + gimp_image_parasite_attach (image_ID, parasite); + gimp_parasite_free(parasite); + } } return;