Commit Graph

7 Commits

Author SHA1 Message Date
Jacob Boerema 40b2412fa4 plug-ins: add synchronization with certain Exif tags.
Exif tags Exif.Image.Artist, Exif.Image.ImageDescription, and
Exif.Image.Copyright were not being synchronized with their Xmp and
Iptc.IIM equivalents in the metadata-editor.

This commit adds synchronization of reading and writing of the metadata.

We adjust the struct for equivalent_metadata_tags by removing unused
fields and adding a field that points to the equivalent Exif tag in
a new struct called exif_tag_info.

On loading of the metadata tags we now also check a limited set of
Exif tags. If no value was set yet, we use the Exif value, or else
we check to make sure both had the same value. If not, print a
warning in the terminal.

On saving of metadata, we now also save to the marked Exif tags, or
if the value is NULL, we remove the tag.

In passing, we also fix two memory leaks by freeing with g_strfreev
temporary string lists.
2023-08-14 17:29:44 -04:00
Jacob Boerema c633091d54 plug-ins: in metadata-editor use array size constants...
instead of hard-coded numbers.
Also:
- remove unneeded set_tag_string for n_creatorContactInfoTags
- remove now unneeded structs
2023-08-13 15:15:04 -04:00
Jacob Boerema 4e40a3edd2 plug-ins: make mode in metadata-editor an enum
We were using a string for the metadata mode, meaning we had to compare
string values in a lot of places.

We simplify and probably speed-up comparisons here by replacing the
mode string by an enum value.

The only place still needing the string values sometimes is
metadata-impexp.[ch] where we added a conversion table to convert
the mode to a string.
2023-08-13 15:15:03 -04:00
Jacob Boerema 8969bbcee8 plug-ins: Remove dependency on GtkBuilder from metadata-editor
Instead of loading the GtkBuilder .ui file we now create all widgets in
code.
Added several support functions to reduce code copy/pasting and making
additional widgets and supporting more metadata easier.
The overall layout should still look the same, with a few exceptions:
- Each notebook page only uses one grid. This makes it possible to align
all data entry widgets.
- Featured Organization and it's code were two treeviews next to each
other. These are now organized below each other to make automatic code
generation easier.
- Since we needed to touch this code anyway, I also fixed Xmp.dc.creator
and Xmp.iptcExt.ModelAge to be multiline. This closes #7286.
- The old icons used for the date button, add, and remove row buttons
were replaced by gimp-grid, list-add and list-remove.

Since this was the last .ui file used in GIMP plug-ins, we remove all
files from the .ui subdirectory and references to that.

Note that there are several more places where GtkBuilder is used, but
those cases uses strings defined in code instead of .ui files.
2023-05-10 13:25:12 -04:00
Michael Natterer b6b84f7afa plug-ins: port the metadata plug-ins to GimpPlugIn and object 2019-08-27 18:28:56 +02:00
Michael Natterer 5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
Ben Touchette dc9856cfe1 Bug 769820 - Cannot enter Iptc information when no metadata is available...
...and fails to write it to file when it is

Completely redo metadata editor and viewer code, adds support for
Xmp.xmpMM.History and more.
2017-07-07 18:11:39 +02:00