Commit f67100f5 authored by Michael Natterer's avatar Michael Natterer 😴

plug-ins: attach the default comment to all screenshots

not only to screenshots made with the X11 backend.
parent 790cde3d
......@@ -407,7 +407,6 @@ create_image (cairo_surface_t *surface,
gint32 image;
gint32 layer;
gdouble xres, yres;
gchar *comment;
gint width, height;
gimp_progress_init (_("Importing screenshot"));
......@@ -421,20 +420,6 @@ create_image (cairo_surface_t *surface,
gimp_get_monitor_resolution (&xres, &yres);
gimp_image_set_resolution (image, xres, yres);
comment = gimp_get_default_comment ();
if (comment)
{
GimpParasite *parasite;
parasite = gimp_parasite_new ("gimp-comment", GIMP_PARASITE_PERSISTENT,
strlen (comment) + 1, comment);
gimp_image_attach_parasite (image, parasite);
gimp_parasite_free (parasite);
g_free (comment);
}
layer = gimp_layer_new_from_surface (image,
name ? name : _("Screenshot"),
surface,
......
......@@ -273,6 +273,24 @@ run (const gchar *name,
if (status == GIMP_PDB_SUCCESS)
{
gchar *comment = gimp_get_default_comment ();
if (comment)
{
GimpParasite *parasite;
parasite = gimp_parasite_new ("gimp-comment",
GIMP_PARASITE_PERSISTENT,
strlen (comment) + 1, comment);
gimp_image_attach_parasite (image_ID, parasite);
gimp_parasite_free (parasite);
g_free (comment);
}
gimp_image_clean_all (image_ID);
if (run_mode == GIMP_RUN_INTERACTIVE)
{
/* Store variable states for next run */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment