mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-04 09:53:25 +00:00
app: make gimp_image_new_add_creation_metadata() static
This commit is contained in:
parent
2bb6b6b970
commit
868d566c7f
1 changed files with 28 additions and 20 deletions
|
@ -54,6 +54,11 @@
|
||||||
#include "gimp-intl.h"
|
#include "gimp-intl.h"
|
||||||
|
|
||||||
|
|
||||||
|
static void gimp_image_new_add_creation_metadata (GimpImage *image);
|
||||||
|
|
||||||
|
|
||||||
|
/* public functions */
|
||||||
|
|
||||||
GimpTemplate *
|
GimpTemplate *
|
||||||
gimp_image_new_get_last_template (Gimp *gimp,
|
gimp_image_new_get_last_template (Gimp *gimp,
|
||||||
GimpImage *image)
|
GimpImage *image)
|
||||||
|
@ -102,26 +107,6 @@ gimp_image_new_set_last_template (Gimp *gimp,
|
||||||
G_OBJECT (gimp->image_new_last_template), 0);
|
G_OBJECT (gimp->image_new_last_template), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
gimp_image_new_add_creation_metadata (GimpImage *image)
|
|
||||||
{
|
|
||||||
GimpMetadata *metadata;
|
|
||||||
|
|
||||||
metadata = gimp_image_get_metadata (image);
|
|
||||||
if (! metadata)
|
|
||||||
{
|
|
||||||
g_critical ("Metadata not found. Should not happen!");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
GDateTime *datetime;
|
|
||||||
|
|
||||||
datetime = g_date_time_new_now_local ();
|
|
||||||
gimp_metadata_set_creation_date (metadata, datetime);
|
|
||||||
g_date_time_unref (datetime);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
GimpImage *
|
GimpImage *
|
||||||
gimp_image_new_from_template (Gimp *gimp,
|
gimp_image_new_from_template (Gimp *gimp,
|
||||||
GimpTemplate *template,
|
GimpTemplate *template,
|
||||||
|
@ -728,3 +713,26 @@ gimp_image_new_from_pixbuf (Gimp *gimp,
|
||||||
|
|
||||||
return new_image;
|
return new_image;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* private functions */
|
||||||
|
|
||||||
|
static void
|
||||||
|
gimp_image_new_add_creation_metadata (GimpImage *image)
|
||||||
|
{
|
||||||
|
GimpMetadata *metadata;
|
||||||
|
|
||||||
|
metadata = gimp_image_get_metadata (image);
|
||||||
|
if (! metadata)
|
||||||
|
{
|
||||||
|
g_critical ("Metadata not found. Should not happen!");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
GDateTime *datetime;
|
||||||
|
|
||||||
|
datetime = g_date_time_new_now_local ();
|
||||||
|
gimp_metadata_set_creation_date (metadata, datetime);
|
||||||
|
g_date_time_unref (datetime);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue