plug-ins: use begin_export() and end_export() in file-xbm
so the "gimp-comment" parasite is handled automatically.
This commit is contained in:
parent
c25778c882
commit
ba77ce58c7
1 changed files with 2 additions and 18 deletions
|
|
@ -343,7 +343,7 @@ xbm_save (GimpProcedure *procedure,
|
|||
gegl_init (NULL, NULL);
|
||||
|
||||
config = gimp_procedure_create_config (procedure);
|
||||
gimp_procedure_config_begin_run (config, image, run_mode, args);
|
||||
gimp_procedure_config_begin_export (config, image, run_mode, args, NULL);
|
||||
|
||||
switch (run_mode)
|
||||
{
|
||||
|
|
@ -376,22 +376,6 @@ xbm_save (GimpProcedure *procedure,
|
|||
{
|
||||
GimpParasite *parasite;
|
||||
|
||||
/* Get the parasites */
|
||||
parasite = gimp_image_get_parasite (image, "gimp-comment");
|
||||
|
||||
if (parasite)
|
||||
{
|
||||
gchar *comment = g_strndup (gimp_parasite_data (parasite),
|
||||
gimp_parasite_data_size (parasite));
|
||||
|
||||
g_object_set (config,
|
||||
"comment", comment,
|
||||
NULL);
|
||||
|
||||
g_free (comment);
|
||||
gimp_parasite_free (parasite);
|
||||
}
|
||||
|
||||
parasite = gimp_image_get_parasite (image, "hot-spot");
|
||||
|
||||
if (parasite)
|
||||
|
|
@ -481,7 +465,7 @@ xbm_save (GimpProcedure *procedure,
|
|||
g_object_unref (mask_file);
|
||||
}
|
||||
|
||||
gimp_procedure_config_end_run (config, status);
|
||||
gimp_procedure_config_end_export (config, image, file, status);
|
||||
g_object_unref (config);
|
||||
|
||||
if (export == GIMP_EXPORT_EXPORT)
|
||||
|
|
|
|||
Loading…
Reference in a new issue