gimp/plug-ins
Jehan d493f0537f Issue #8900 and #9923: reimplementing GimpUnit as a proper class.
This fixes all our GObject Introspection issues with GimpUnit which was
both an enum and an int-derived type of user-defined units *completing*
the enum values. GIR clearly didn't like this!

Now GimpUnit is a proper class and units are unique objects, allowing to
compare them with an identity test (i.e. `unit == gimp_unit_pixel ()`
tells us if unit is the pixel unit or not), which makes it easy to use,
just like with int, yet adding also methods, making for nicer
introspected API.

As an aside, this also fixes #10738, by having all the built-in units
retrievable even if libgimpbase had not been properly initialized with
gimp_base_init().
I haven't checked in details how GIR works to introspect, but it looks
like it loads the library to inspect and runs functions, hence
triggering some CRITICALS because virtual methods (supposed to be
initialized with gimp_base_init() run by libgimp) are not set. This new
code won't trigger any critical because the vtable method are now not
necessary, at least for all built-in units.

Note that GimpUnit is still in libgimpbase. It could have been moved to
libgimp in order to avoid any virtual method table (since we need to
keep core and libgimp side's units in sync, PDB is required), but too
many libgimpwidgets widgets were already using GimpUnit. And technically
most of GimpUnit logic doesn't require PDB (only the creation/sync
part). This is one of the reasons why user-created GimpUnit list is
handled and stored differently from other types of objects.

Globally this simplifies the code a lot too and we don't need separate
implementations of various utils for core and libgimp, which means less
prone to errors.
2024-08-02 10:46:38 +02:00
..
common Issue #8900 and #9923: reimplementing GimpUnit as a proper class. 2024-08-02 10:46:38 +02:00
file-bmp libgimp, plug-ins: Run gimp_export_image ()... 2024-07-14 20:12:57 +00:00
file-dds libgimp, plug-ins: Run gimp_export_image ()... 2024-07-14 20:12:57 +00:00
file-exr plug-ins: Fix crash with OpenEXR chroma images 2024-06-18 19:42:59 +00:00
file-faxg3 meson: on macOS temporarily update rpath to find libraries of non-installed GIMP. 2024-04-16 17:43:15 +00:00
file-fits libgimp, plug-ins: Run gimp_export_image ()... 2024-07-14 20:12:57 +00:00
file-fli libgimp, plug-ins: Run gimp_export_image ()... 2024-07-14 20:12:57 +00:00
file-icns plug-ins: Port file-icns/file-ico to GimpProcedureDialog 2024-07-19 02:29:38 +00:00
file-ico plug-ins: Port file-icns/file-ico to GimpProcedureDialog 2024-07-19 02:29:38 +00:00
file-jpeg Issue #8900 and #9923: reimplementing GimpUnit as a proper class. 2024-08-02 10:46:38 +02:00
file-psd Issue #8900 and #9923: reimplementing GimpUnit as a proper class. 2024-08-02 10:46:38 +02:00
file-raw plug-ins: Update Darktable API check 2024-05-25 17:59:37 +00:00
file-sgi libgimp, plug-ins: Run gimp_export_image ()... 2024-07-14 20:12:57 +00:00
file-tiff Issue #8900 and #9923: reimplementing GimpUnit as a proper class. 2024-08-02 10:46:38 +02:00
file-webp libgimp, plug-ins: Run gimp_export_image ()... 2024-07-14 20:12:57 +00:00
flame plug-ins: Port argument macros to functions 2024-06-13 23:17:48 +00:00
fractal-explorer plug-ins: Additional radio frame changes from d7a3a161 2024-07-15 18:12:30 +00:00
gfig meson: on macOS temporarily update rpath to find libraries of non-installed GIMP. 2024-04-16 17:43:15 +00:00
gimpressionist plug-ins: Port argument macros to functions 2024-06-13 23:17:48 +00:00
gradient-flare plug-ins: Port argument macros to functions 2024-06-13 23:17:48 +00:00
help plug-ins: Port argument macros to functions 2024-06-13 23:17:48 +00:00
help-browser plug-ins: Port argument macros to functions 2024-06-13 23:17:48 +00:00
ifs-compose plug-ins: Port argument macros to functions 2024-06-13 23:17:48 +00:00
imagemap plug-ins: Convert custom ImageMap icons to vectors 2024-08-02 00:01:55 +00:00
lighting plug-ins: Port argument macros to functions 2024-06-13 23:17:48 +00:00
map-object plug-ins: Port argument macros to functions 2024-06-13 23:17:48 +00:00
metadata meson: on macOS temporarily update rpath to find libraries of non-installed GIMP. 2024-04-16 17:43:15 +00:00
pagecurl plug-ins: Port argument macros to functions 2024-06-13 23:17:48 +00:00
print Issue #8900 and #9923: reimplementing GimpUnit as a proper class. 2024-08-02 10:46:38 +02:00
python plug-ins: fix pyconsole syntax for Python 3.12 2024-07-13 20:09:25 +00:00
screenshot plug-ins: Port int_combo properties to GimpChoice 2024-07-26 18:56:53 +00:00
script-fu plug-ins: script-fu-paste-as-new-pattern, adjusted call to (file-pat-export) 2024-07-20 19:02:27 +00:00
selection-to-path libgimp, app, pdb: Rename GimpVectors to GimpPath 2024-07-12 06:16:25 +00:00
twain Issue #8900 and #9923: reimplementing GimpUnit as a proper class. 2024-08-02 10:46:38 +02:00
meson.build plug-ins: Remove dependency on GtkBuilder from metadata-editor 2023-05-10 13:25:12 -04:00