Commit Graph

70 Commits

Author SHA1 Message Date
Jehan df074bfe09 plug-ins: label and documentation of plug-ins localized plug-in side.
This is the consequence of previous commit. Plug-ins' label and
documentation are now localized before sending these data to GIMP core.
In other words, we replace N_() macros with basic gettext calls.
2022-07-05 12:23:51 +02:00
Jehan 18c37f7084 plug-ins, libgimp: override set_i18n() for all our core plug-ins.
Hence avoiding the stderr messages. These are going to be localized with
centrally installed catalogs "gimp*-std-plugins", "gimp*-script-fu" and
"gimp*-python".

We now handle core plug-in localizations differently and in particular,
with kind of a reverse logic:

- We don't consider "gimp*-std-plugins" to be the default catalog
  anymore. It made sense in the old world where we would consider the
  core plug-ins to be the most important and numerous ones. But we want
  to push a world where people are even more encouraged to develop their
  own plug-ins. These won't use the standard catalog anymore (because
  there are nearly no reasons that the strings are the same, it's only a
  confusing logic). So let's explicitly set the standard catalogs with
  DEFINE_STD_SET_I18N macro (which maps to a different catalog for
  script-fu plug-ins).
- Doing something similar for Python plug-ins which have again their own
  catalog.
- Getting rid of the INIT_I18N macro since now all the locale domain
  binding is done automatically by libgimp when using the set_i18n()
  method infrastructure.
2022-06-05 01:57:02 +02:00
NikcDC ba1896fd53 Issue #5648: Allow users to set the number of GIF loops 2022-03-21 14:54:57 +00:00
Jacob Boerema 1731c875a1 plug-ins: fix the fix for #6116 grayscale gif animation.
I must have not been awake yet when I pushed the
fix for #6116 because it has two problems:
- Updating cur_progress caused by not editing the
  for loop after a copy/paste, found thanks to
  Stanislav Grinkov.
- Not using the correct drawable to determine the
  drawable_type which I noticed while fixing the
  above issue.

These issues are not present in the backported
version for 2.10.
2021-05-31 11:59:58 -04:00
Marie-P c112a55958 libgimp*, plug-ins: fix some warnings 2021-05-24 20:36:31 +00:00
Jacob Boerema 3b3ab0aa11 plug-ins: fix #6116 grayscale gif animation hangs on export.
GIF export was not taking into account that there can be
both grayscale layers with and without alpha in an image.

We make sure that the GEGL buffer knows the type of
drawable for the current layer.
2021-05-19 17:38:32 -04:00
Jehan ca8bc2bc1d app, libgimp, pdb, plug-ins: more functions moved to get|set().
The gimp_drawable_type() is an issue though as gimp_drawable_get_type()
is already defined as a common GObject API.
Though I'm actually wondering if GimpImageType is well called. Rather
than Type, shouldn't we go with ColorModel?

sed -i 's/\<gimp_drawable_bpp\>/gimp_drawable_get_bpp/g' "$@"
sed -i 's/\<gimp_drawable_width\>/gimp_drawable_get_width/g' "$@"
sed -i 's/\<gimp_drawable_height\>/gimp_drawable_get_height/g' "$@"
sed -i 's/\<gimp_drawable_offsets\>/gimp_drawable_get_offsets/g' "$@"
2021-04-06 14:34:31 +02:00
Jehan fa16152757 app, libgimp, pdb, plug-ins: update some more functions to get|set().
s/gimp_image_base_type/gimp_image_get_base_type/
s/gimp_image_width/gimp_image_get_width/
s/gimp_image_height/gimp_image_get_height/

Sorry plug-in developers, more porting work! But really this seems like
the right thing to do in order not to get stuck with inconsistent naming
for many more years to come.
2021-04-06 00:49:07 +02:00
Michael Natterer 0d56bbb745 plug-ins: change "comment" arguments to "gimp-comment"
so they continue to be handled automatically.
2020-06-17 21:56:31 +02:00
Jehan d3139e0f7c app: support saving/exporting with multi-selection.
This commit just changes our saving API (i.e. the GimpSaveProcedure
class) to take an array of drawables as argument instead of a single
drawable.

It actually doesn't matter much for exporting as the whole API seems
more or less bogus there and all formats plug-ins mostly care only
whether they will merge/flatten all visible layers (the selected ones
don't really matter) or if the format supports layers of some sort. It
may be worth later strengthening a bit this whole logics, and maybe
allow partial exports for instance.

As for saving, it was not even looking at the passed GimpDrawable either
and was simply re-querying the active layer anyway.
Note that I don't implement the multi-selection saving in XCF yet in
this commit. I only updated the API. The reason is that the current
commit won't be backportable to gimp-2-10 because it is an API break. On
the other hand, the code to save multi-selection can still be backported
even though the save() API will only pass a single drawable (as I said
anyway, this argument was mostly bogus until now, hence it doesn't
matter much for 2.10 logics).
2020-05-17 18:32:16 +02:00
Michael Natterer a5cf3e9506 plug-ins: port file-gif-save to begin_export() and end_export()
and build its GUI using propwidgets. Remove a lot of code that
is now handled by GimpProcedureConfig, and remove the ui file.
2019-10-29 22:10:59 +01:00
Michael Natterer df8d5b02ae libgimp, plug-ins: remove the "preview" parameter from gimp_ui_init()
It's dead since a looong time.
2019-09-20 19:56:00 +02:00
Michael Natterer 8a78203aed Properly prefix the values of enum GimpPDBProcType
to be GIMP_PDB_PROC_TYPE_PLUGIN, _EXTENSION etc.
2019-08-30 12:52:28 +02:00
Michael Natterer 0b3e02be10 libgimp: again, redo all APIs returning list of images, items, children
We now have both variants, one returning a GList, and another
returning an array. Turns out that while a list is often nicer,
sometimes a random-access array really keeps the code much simpler.

Adapt all plug-ins, and clean up a bit (like use g_list_reverse() once
instead of iterating the list reversed).
2019-08-27 13:26:27 +02:00
Michael Natterer d7fb408267 plug-ins: port file-gif-save to GimpPlugIn and libgimp objects 2019-08-24 15:57:54 +02:00
Michael Natterer de121374ef Change the "handles uri" flag of file procedures to "handle remote"
And always pass URIs to all file procedures, the ones what didn't
register as "handles remove" will only ever get local file:// URIs.

Change all file plug-ins (also legacy ones) to expect URIs instead
of filenames, and convert to local paths in the plug-in.

The wire protocol should now be almost 100% clean of non-UTF-8 strings.
2019-08-19 12:05:12 +02:00
Michael Natterer bdbec7941c Use the new macros from the last commit in all files
...and gone are the annoying warnings.
2018-05-20 21:06:34 +02:00
Michael Natterer 801bd8fb3f plug-ins: get rid of icons in dialog buttons (use labels not stock IDs) 2017-02-12 16:18:54 +01:00
Jehan 9ab041d36a plug-ins: small typo fix - s/framese/frames/ 2016-11-08 01:39:42 +01:00
Pascal Massimino 21d8c00d16 plug-ins: make file_gif_spin_button_int_init() generic.
Use the `value_pointer` parameter instead of modifying the globale
`gsvals.default_delay`. This doesn't change anything in current code
where file_gif_spin_button_int_init() is only used for connecting this
variable to the delay spin button, but could have been a problem if it
were reused in the future.
2016-11-06 18:04:32 +01:00
Jehan 99a22418b9 Bug 769340 - GIF export dialog: false memory.
"As animation" is checked while being insensitive on a single-layer
image when previously exporting a GIF animation in the same session.
2016-07-31 06:26:48 +02:00
Michael Natterer ba8dd17396 plug-ins: port file-gif-save to GIO 2016-04-14 18:49:30 +01:00
Michael Natterer b85d03eaab plug-ins: cleanup in file-gif-save
From the book of stashes, chapter 42.
2016-04-14 16:54:08 +01:00
Jehan ec27b539ea plug-ins: various s/save/export/ replacement on visible strings. 2016-02-16 02:35:43 +01:00
Jehan 0593eaa7c3 plug-ins: GEGL buffers leaked when canceling gif export.
Delete the duplicated sanitized image when canceling in the gif options
dialog.
2015-09-04 18:26:35 +02:00
Jehan 6b33491ce4 plug-ins: returned value of gimp_image_get_layers() must be freed. 2015-09-04 18:24:21 +02:00
Jehan 765975dfd6 plug-ins: gif export should not carry on when sanity_check() fails.
This specific crash was only occuring when GIMP_INTERACTIVE_EXPORT=1
and canceling the first dialog. So that should not happen too often,
but well, now it's fixed…
2015-09-03 15:33:22 +02:00
Michael Natterer 6a079b980b plug-ins: format prototypes in file-gif-save 2015-02-15 22:52:37 +01:00
Mukund Sivaraman be45ec02dc Revert "file-gif-save: Export images in non-interactive run mode (Bug #698450)"
This reverts commit 197280311a.
2014-09-26 16:39:49 +05:30
Mukund Sivaraman 197280311a file-gif-save: Export images in non-interactive run mode (Bug #698450) 2014-09-26 13:36:32 +05:30
Michael Natterer f28878b6d3 plug-ins: start the progress before opening files for loading/saving
so the user gets feedback as early as possible.
2014-07-23 21:37:13 +02:00
Ed J b42cedd383 No tabs please, we're British. 2014-05-16 17:46:18 +01:00
Ed J a3be308aea file-gif-save2 takes 3 more params. 2014-05-16 17:37:06 +01:00
Michael Natterer 03df8c6af4 plug-ins: pass the format's name again in calls to gimp_export_image()
and clean up the formatting of the call and the lines around it. Now
we can check the various (disabled) export options for regressions
again by changing a single line in gimp_export_image().
2013-11-10 00:18:48 +01:00
Clayton Walker 264d09b417 Rename colour and greyscale to color and grayscale respectively 2013-06-06 23:26:16 +02:00
Mukund Sivaraman d72226baf7 file-gif-save: Don't use register keyword 2013-05-30 10:56:24 +05:30
Michael Natterer b0834ecfbe plug-ins: remove more cruft from file-gif-save 2013-05-27 22:56:01 +02:00
Michael Natterer 66f6fb9aa6 plug-ins: always build all GIF compression functions, but always use LZW 2013-05-27 22:56:01 +02:00
Michael Natterer 7f8a9331ed plug-ins: remove crufty and obfuscating #ifdefs from file-gif-save 2013-05-27 22:56:01 +02:00
Jehan 9fa112f6b3 Bug 690728: file-gif-save plug-in crops the actual image the user is working on.
Destructive behavior fixed by duplicating the image first, then deleting
the duplicate at the end.
2013-01-20 16:17:55 +09:00
Michael Natterer 67dda14e77 plug-ins: cleanup in the recently GEGL-ported plug-ins
Mostly formatting consistency paranoia.
2012-11-27 20:58:05 +01:00
Michael Natterer aa0a24164c plug-ins: port file-gif-save to GEGL 2012-09-22 23:19:32 +02:00
Michael Natterer c021703914 Bug 668077 - Plural forms
The two plurals are always constant numbers, but use %d to substitute
the constant. Add translator comments.
2012-01-18 20:53:42 +01:00
Mukund Sivaraman 1d5029170c file-gif-save: Drop dead variable and assignments 2011-10-12 16:57:09 +05:30
Mukund Sivaraman 70a6f7e6bf file-gif-save: Delete dead variables and assignments 2011-10-10 10:05:05 +05:30
Mukund Sivaraman d5c1e09643 file-gif-save: Delete dead variables and assignments 2011-10-06 19:42:47 +05:30
Mukund Sivaraman aac5be344f file-gif-save: Remove dead assignments (and variables) 2011-10-03 18:57:48 +05:30
Mukund Sivaraman af547cc0c7 file-gif-save: Remove dead assignments (and variables) 2011-10-03 18:56:14 +05:30
Mukund Sivaraman cd2b6107c3 file-gif-save: Remove dead assignment (and variable) 2011-10-03 18:39:42 +05:30
Mukund Sivaraman b321f4ec51 file-gif-save: Remove dead assignments 2011-10-03 12:49:06 +05:30