mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-19 22:34:37 +00:00
Attach default comment to image made by screenshot. Fixes bug #51164
2003-05-14 Dave Neary <bolsh@gimp.org> * plug-ins/common/screenshot.c: Attach default comment to image made by screenshot. Fixes bug #51164
This commit is contained in:
parent
149e81dab5
commit
d97d3b48d1
|
@ -1,3 +1,8 @@
|
|||
2003-05-14 Dave Neary <bolsh@gimp.org>
|
||||
|
||||
* plug-ins/common/screenshot.c: Attach default comment to
|
||||
image made by screenshot. Fixes bug #51164
|
||||
|
||||
2003-05-14 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/core/Makefile.am
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue