Commit Graph

7 Commits

Author SHA1 Message Date
Michael Natterer afe98c5c70 libgimp: add gimp_procedure_config_save_metadata()
so the export's GimpMetadata can be written at any time during the
export process, which is for example needed for TIFF export.
2020-06-08 14:28:47 +02:00
Michael Natterer 8219092a6c libgimp: start integrating image export with GimpProcedureConfig
Add gimp_procedure_config_begin_export() and end_export() which
are wrappers around begin_run() and end_run() and additionally
pretty much completely manage GimpMetadata handling.

A GimpProcedureConfig can provide boolean properties "save-exif",
"save-xmp" etc. in order to have them automatically managed by
begin_export() and end_export(). This also restores the feature of
overriding the procedure's saved default values with export
preferences, but not the values from the last export, like it
used to be in 2.10.

Move gimp_image_metadata_save_prepare() and save_finish() (which are
now completely handled by GimpProcedureConfig) from libgimpui to
libgimp, but keep their declarations in the libgimpui header. Not
perfect, but not finished either.

Also fix gimp_image_metadata_save_prepare() to set the affected
GimpMetadataSaveFlags to 0 when the image has no metadata at all.
2019-10-09 22:50:03 +02:00
Michael Natterer 9cb62f5f9a libgimp: move "image" and "run_mode" from gimp_procedure_config_end_run()
and remember them internally between begin_run() and end_run().
Simplifies plug-in code even more.

Move the begin_run() before gimp_export_image() block in all export
plug-ins.
2019-09-26 00:44:52 +02:00
Michael Natterer 58bf1d431d libgimp: add a "status" parameter to gimp_procedure_config_end_run()
and require it to be always called paired with begin_run(), which is
more straightforward and makes the resulting code more future-proof.
2019-09-25 12:09:03 +02:00
Michael Natterer 243042730e libgimp: add "image" parameters to gimp_procedure_config_begin,end_run()
When non-NULL, the code tries to load/save image-specific last used
values from/to the image using a parasite. This is meant to be used by
file export plug-ins.
2019-09-23 19:28:04 +02:00
Michael Natterer aa41baef1e libgimp: add gimp_procedure_config_get_procedure()
and use it in gimp_procedure_dialog_new() to make sure that the passed
config was created by the passed procedure.
2019-09-20 19:33:50 +02:00
Michael Natterer b441d100ff libgimp: add GimpProcedureConfig which implements the GimpConfig interface
It's the base for bringing proper management of saved settings
(including the last used values) and generated GUI using prop_widgets
to plug-ins.
2019-09-20 12:34:03 +02:00