Commit Graph

9 Commits

Author SHA1 Message Date
Jehan 34af64b70f extensions, plug-ins: fixing CamelCase on the "Plug-In Examples" items.
First of all: sorry to all translators who started working on these new
strings!

We use CamelCase for our titles, and in particular "Plug-In" is
capitalized with 'I'.

Furthermore, let's use understandable titles like "Plug-In Example in C"
and not just "In C", because while the short title works OK in the menu,
it makes for very broken action names in non-contextual parts of the
software, such as the action search.

Note that we in fact have a concept of short label for actions since
commit 89772351c9. I added support for it to GEGL actions (cf. commit
6dc5f6792e), and to a few core actions (e.g. commit ea1205f094).
Unfortunately I don't think I added an API yet for short label in
plug-ins. Maybe I'll add it soon. But for now, if we have to have a
single label, it should be long, so that it works in every situation.

P.S.: not sure if it's useful to keep documentation strings just
repeating the title, but for now, let's leave them.
2024-08-10 23:33:57 +02:00
bootchk fef971fa8d GUI: Rename menu Filters>Development>Goat exercises => Plug-in Examples
The old menu label was confusing to users.

Remove translatable strings having joke "goat" so translators not confused.

Move the goat plugins to the menu.

The items under the menu should all be example plugins.
The menu is in a release.

Test plugins should not be in this menu.
Test plugins should not ship in a stable release.

!!! Note that 2.10 does not ship with example plugins.
If we don't want 3.0 to ship stable build with example plugins,
then the meson.build for goat-exercises needs to change
and the menu removed entirely in menus/image-menu.ui.in.in.
2024-08-10 14:58:58 +00:00
Jehan 1d50c81130 libgimp, plug-ins, extensions: gimp_image_procedure_new2() renamed gimp_image_procedure_new(). 2023-10-01 21:02:34 +02:00
Alx Sa 22cb6b3bb6 plug-ins: port goat-exercise to gimp_image_procedure_new2()
Not yet porting to GimpProcedureDialog because there's no settings to import/export,
so it would add several unnecessary buttons.
2023-10-01 20:52:02 +02:00
Anders Jonsson 095af5629c extensions: more i18n for goat-exercises 2023-07-22 15:16:42 +00:00
Jehan 3e57f2f482 extensions, po-plug-ins: demo extensions use the new i18n logic.
Since these are demos, for the sake of showing how the localization
works, let's localize the goat-exercises with a locally installed
catalog.
Note that actually use the gimp30-std-plug-ins catalog, simply I copy it
in the plug-in folder and rename it as org.gimp.extension.goat-exercises
domain.

As a consequence:

- The C plug-in does not need the INIT_I18N anymore, which was
  specifically for the centrally installed catalog and cannot be used by
  third-party plug-in developers (so it's not a good demo code).
- I now use GLib.dgettext() for Python instead of the gettext Python
  module, because the later won't "catch" the catalog declared in
  libgimp.
- The other Goat exercises are now localized correctly, unlike before.
- Just setting GETTEXT_PACKAGE is apparently enough for the Vala
  plug-in.
- Lua is untested. Hopefully the code will work.
2022-06-05 01:57:02 +02:00
Jehan 931f44e54a extensions: update the 5 goat-exercise extensions to multi-drawable API. 2021-04-06 01:55:52 +02:00
Jehan 228ad503ad extensions: update the remote URI for the up-to-date source code.
When moving the Goat Exercise plug-ins as extensions, I forgot to update
the remote URI which is opened when clicking the "Source" button.
2020-10-17 19:42:11 +02:00
Jehan ecbc38f9e9 plug-ins, extension: goat-exercises becomes a GIMP extension.
This is an extension containing a few demo plug-ins. This is good to
demonstrate the extension format. It will also allow to disable these
plug-ins (if at some point, one doesn't want to show these demo
plug-ins anymore).

And finally it deals with the fact that our plug-in code is stupid, as
it just tries to find the first executable with the same name (minus
extension) as the plug-in folder. This doesn't go well on Windows, where
the permission system is non-existent. So our code just ends up trying
to run the first file with a similar name in a plug-in folder. As the C
goat-exercise contains both an exe and the C source (and the system
probably returns files in alphabetic order), GIMP under Windows tries to
run the C source instead of the executable (this obviously doesn't go
well).
We could try to do more complex logics, like not aborting if the first
file run fails and try the next one in the plug-in folder. Or maybe just
rename the C file to another name. But any of these is just in the end
the proof that our plug-in discovery right now is just bogus. The
extension system is explicit, not based on randomly trying out files.
Plug-ins entry points are explicitly listed in the metadata manifest.
2020-10-09 15:30:54 +02:00