-
Jehan authored
- get_preset_from_id() was defined in file-webp-dialog.c but used in file-webp.c only. Move it there. - Make the preset list available in file-webp-save.h header (since it is specifically an encoder attribute) as static, because it is used both in the dialog ("preset" choice list) and the main file (for match of the "preset" parameter as internal ID to a WebPPreset when run as non-interactive). - Generate the "preset" parameter description from the preset list. This way, even if this list were to change (in some hypothetical future), the description (and in particular the list of possible values and their int match) won't end up wrong. - "enum WebPPreset" is typedef-ed to "WebPPreset". - Use G_N_ELEMENTS to compute length of arrays on the stack (equivalent to the current code but shorter and simpler to read). - Many formatting fixes.
58e6f6ca