Skip to content

libgimp: 'gimp_ui' as priority prefix for GimpUi introspected module.

Jehan requested to merge wip/Jehan/GimpUi.init into master

Since meson 0.43.0 (below our current requirement), 'symbol_prefix' argument of gnome.generate_gir() allows an ordered list. If I prepend 'gimp_ui', it makes any gimp_ui_*() function to not start with 'ui_'.

In particular, GimpUi.ui_init() becomes GimpUi.init() which is much less redundant.

@nielsdg I need your help! I have not pushed this commit because it breaks Vala.

I get such error:

../../../../../../../dev/src/gimp/plug-ins/goat-exercises/goat-exercise-vala.vala:61.7-61.18: error: The name `ui_init' does not exist in the context of `Gimp'
      Gimp.ui_init(PLUG_IN_BINARY);
      ^^^^^^^^^^^^
Compilation failed: 1 error(s), 0 warning(s)

But if I replace by GimpUi.init, I get:

../../../../../../../dev/src/gimp/plug-ins/goat-exercises/goat-exercise-vala.vala:61.7-61.12: error: The name `GimpUi' does not exist in the context of `Goat.run'

And if I replace by Gimp.init() (which is not very nice as I lose the right domain, which is problematic in case we had similar named functions in Gimp and GimpUi but I noticed that the Vala plug-in called Gimp.Dialog for instance, and not GimpUi.Dialog):

/home/jehan/.local/share/crossroad/artifacts/native/gimp/gimp/../../../../../../../dev/src/gimp/plug-ins/goat-exercises/goat-exercise-vala.vala:61: undefined reference to `gimp_init'

So how does Vala works here, regarding such prefix change?

Edited by Jehan

Merge request reports