Commit Graph

8800 Commits

Author SHA1 Message Date
Michael Natterer 7257cc8abc plug-ins: port curve-bend to GimpPlugIn... IT'S DONE YEAH 2019-09-03 23:29:21 +02:00
Michael Natterer f405b45058 plug-ins: port sample-colorize to GimpPlugIn 2019-09-03 22:51:18 +02:00
Michael Natterer bdbe1ee06d plug-ins: port sparkle to GimpPlugIn 2019-09-03 22:16:39 +02:00
Michael Natterer 5c5b4642b1 plug-ins: port warp to GimpPlugIn 2019-09-03 21:30:27 +02:00
Michael Natterer 4ded322edf plug-ins: port map-object to GimpPlugIn 2019-09-03 21:00:23 +02:00
Michael Natterer 9e3359c659 plug-ins: port lighting to GimpPlugIn 2019-09-03 19:58:18 +02:00
Michael Natterer 5154b27108 plug-ins: port depth-merge to GimpPlugIn 2019-09-03 19:22:42 +02:00
Michael Natterer 0785dd17a5 plug-ins: port sphere-designer to GimpPlugIn 2019-09-03 15:37:52 +02:00
Jehan 71ccaa21ee pdb, libgimp: remove double API generation from PDB.
All plug-ins got ported. Let's remove support for the old API with IDs
instead of objects.
2019-09-03 13:31:27 +02:00
Michael Natterer a4637b0d69 plug-ins: remove deprecated API support from common/mkgen.pl 2019-09-03 13:25:25 +02:00
Michael Natterer 29687012c4 plug-ins: port tile to GimpPlugIn 2019-09-03 13:24:05 +02:00
Michael Natterer 8245102bbd plug-ins: print: fix missing argument to GIMP_PROC_ARG_IMAGE() 2019-09-03 12:42:17 +02:00
Michael Natterer 6ba3fb3bd1 plug-ins: port curve-bend to libgimp oobjects. THE LAST ONE \o/ 2019-09-03 11:59:53 +02:00
Michael Natterer adfe5ee390 plug-ins: port sphere-designer to libgimp objects 2019-09-03 11:36:41 +02:00
Michael Natterer 0b98a3e2e8 plug-ins: blind port of twain to libgimp objects
Please somebody build and fix this on windows.
2019-09-03 11:17:01 +02:00
Michael Natterer 45d60acb65 plug-ins: use the new item-type specific get_by_id() functions 2019-09-03 10:48:32 +02:00
Michael Natterer 1f4a5d4004 plug-ins: port map-objects to libgimp objects 2019-09-03 10:28:21 +02:00
Michael Natterer 71f767efc0 plug-ins: port lightning to libgimp objects 2019-09-02 19:34:07 +02:00
Michael Natterer add31e2976 plug-ins: fix a glitch in the script-fu unique argument name logic 2019-09-02 19:34:07 +02:00
Michael Natterer 6e0185b976 plug-ins: make sure script-fu arguments have unique names 2019-09-02 18:52:57 +02:00
Michael Natterer a1343ee89c plug-ins: fix duplicate argument name in file-gih-save 2019-09-02 17:56:06 +02:00
Michael Natterer 2d50192c08 plug-ins: port smooth-palette to GimpPlugIn and libgimp objects 2019-09-02 16:10:12 +02:00
Michael Natterer f68bf39a09 plug-ins: port van-gogh-lic to GimpPlugIn and libgimp objects 2019-09-02 14:55:42 +02:00
Michael Natterer 3f44a21b11 plug-ins: port despeckle to GimpPlugIn 2019-09-02 13:06:57 +02:00
Michael Natterer 3b65365982 plug-ins: port gradient-flare to GimpPlugIn 2019-09-02 12:43:10 +02:00
Jehan 3c6360a373 plug-ins: port spyro-plus to Python 3 + new API.
It is a nearly full port. Some things would still need to be updated
(like deprecated use of GtkTable or gtk_range_set_update_policy()
removed), and other stuff need to be taken care of in GIMP API first.
But the core of the feature is there.
2019-09-02 11:42:38 +02:00
Michael Natterer e70137d80f plug-ins: port gimpressionist to GimpPlugIn
And some forgotten libgimp object porting.
2019-09-01 10:48:05 +02:00
Michael Natterer 0a1a9fce5b plug-ins: port qbist to GimpPlugIn 2019-09-01 02:49:31 +02:00
Michael Natterer 7bd9f2d2b5 plug-ins: port tile-small to GimpPlugIn 2019-08-31 16:44:10 +02:00
Michael Natterer 7fe136c638 plug-ins: port flame to GimpPlugIn 2019-08-31 14:42:33 +02:00
Michael Natterer 4721f9843d plug-ins: port hot to GimpPlugIn 2019-08-31 13:43:58 +02:00
Michael Natterer dcc89fb611 plug-ins: port crop-zealous to GimpPlugIn 2019-08-31 12:23:34 +02:00
Michael Natterer 61131f6584 plug-ins: port cml-explorer to GimpPlugIn 2019-08-31 12:03:19 +02:00
Michael Natterer e4c0e9cf4c plug-ins: port animation-optimize to GimpPlugIn 2019-08-31 11:29:47 +02:00
Michael Natterer 0228d4c079 plug-ins: change the port of depth-merge slightly 2019-08-31 02:56:16 +02:00
Michael Natterer 4cb23666db plug-ins: port warp to libgimp objects 2019-08-31 02:43:48 +02:00
Michael Natterer 9e5f802ab9 plug-ins: port depth-merge to libgimp objects 2019-08-31 01:10:44 +02:00
Michael Natterer 4ce5728d3a plug-ins: port gradient-map to libgimp objects 2019-08-31 00:24:02 +02:00
Michael Natterer 2395776215 plug-ins: port gimpressionist to libgimp objects 2019-08-31 00:19:20 +02:00
Michael Natterer 9afc7cad3d plug-ins: port tile to libgimp objects 2019-08-30 19:45:34 +02:00
Michael Natterer 7b099b0568 plug-ins: port tile-small to libgimp objects 2019-08-30 19:33:09 +02:00
Michael Natterer dfe73bf4ba plug-ins: port some simple plug-ins to libgimp objects
(where simple == doesn't use much API)
2019-08-30 19:27:19 +02:00
Michael Natterer cecd7e3aae plug-ins: port sample-colorize to libgimp objects 2019-08-30 18:42:45 +02:00
Michael Natterer b407d33259 plug-ins: port flame to libgimp objects 2019-08-30 18:00:44 +02:00
Michael Natterer f4b97e740c plug-ins: port nl-filter to GimpPlugIn 2019-08-30 16:38:18 +02:00
Michael Natterer c5745ad922 plug-ins: port jigsaw to GimpPlugIn 2019-08-30 16:21:42 +02:00
Michael Natterer 26ab882223 plug-ins: port grid to GimpPlugIn 2019-08-30 15:26:06 +02:00
Michael Natterer 138b99032e plug-ins: port destripe to GimpPlugIn 2019-08-30 15:01:56 +02:00
Michael Natterer f4d0c8834a plug-ins: port contrast-retinex to GimpPlugIn 2019-08-30 14:27:33 +02:00
Michael Natterer cf6b65b71b plug-ins: port checkerboard to GimpPlugIn 2019-08-30 14:12:41 +02:00
Michael Natterer 749ad22c05 plug-ins: port blinds to GimpPlugIn 2019-08-30 13:24:10 +02:00
Michael Natterer 4364b78446 libgimp: remove the GIMP_DISABLE_COMPAT_CRUFT define
there is no legacy API left a ported plug-in could accidentially use.
2019-08-30 13:00:00 +02:00
Michael Natterer 5567a89347 plug-ins: add missing GIMP_ITEM() cast in curve-bend 2019-08-30 12:59:30 +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 e095af2ee4 plug-ins: port gradient-map 2019-08-30 11:11:16 +02:00
Michael Natterer 73298481f1 plug-ins: oops, file-glob is not an image procedure 2019-08-30 10:49:04 +02:00
Michael Natterer ca1ef132c3 plug-ins: port file-glob 2019-08-30 02:15:30 +02:00
Jehan 2524e9685e plug-ins: port guillotine.
Maybe should we have IMAGE_ARRAY types as we still have to pass image
IDs when we pass more than one image between core and plug-in. And even
maybe have alternate LIST types to ARRAY ones, so that we can pass GList
through rather than one array parameter + one length parameter.

Anyway this port still return just old style array of image IDs + array
length as int32.
2019-08-30 00:45:08 +02:00
Michael Natterer 1ee7cc867a plug-ins: port wavelet-decompose 2019-08-30 00:23:14 +02:00
Michael Natterer 6e43d793ae plug-ins: port decompose 2019-08-29 20:01:30 +02:00
Michael Natterer c765fb2b6a plug-ins: port compose 2019-08-29 19:22:50 +02:00
Michael Natterer 392f00baf5 app, libgimp: get rid of all ID GTypes and ID param specs
Turn all ID param specs into object param specs (e.g. GimpParamImageID
becomes GimpParamImage) and convert between IDs and objects in
gimpgpparams.c directly above the the wire protocol, so all of app/,
libgimp/ and plug-ins/ can deal directly with objects down to the
lowest level and not care about IDs.

Use the actual object param specs for procedure arguments and return
values again instead of a plain g_param_spec_object() and bring back
the none_ok parameter.

This implies changing the PDB type checking functions to work on pure
integers instead of IDs (one can't check whether object creation is
possible if performing that check requires the object to already
exist).

For example gimp_foo_is_valid() becomes gimp_foo_id_is_valid() and is
not involved in automatic object creation magic at the protocol
level. Added wrappers which still say gimp_foo_is_valid() and take the
respective objects.

Adapted all code, and it all becomes nicer and less convoluted, even
the generated PDB wrappers in app/ and libgimp/.
2019-08-29 11:39:34 +02:00
Jehan 02d06bb354 plug-ins: help and help-browser don't need libgimp class porting. 2019-08-28 15:08:10 +02:00
Jehan 22857b5408 plug-ins: port busy-dialog. 2019-08-28 14:44:53 +02:00
Jehan 34c6e8744c plug-ins: port py-slice to new API.
No GUI done yet on this one either. For now it will just slice the image
and export them, as well as a HTML table in the current directory.
2019-08-28 13:19:52 +02:00
Jehan 1b992e98d3 plug-ins: port border-average to new API. 2019-08-28 12:23:16 +02:00
Jehan f75b63fa80 plug-ins: port align-layers to new API + libgimp objects.
Note: there were 2 additional arguments which were totally unused in the
existing implementation. So I commented them out. Anyone is welcome to
actually implement their usage.
2019-08-28 11:54:29 +02:00
Michael Natterer 8d7d2e5f1d plug-ins: port imagemap to foo and bar, why do I bother... 2019-08-28 10:14:28 +02:00
Michael Natterer 55a53ef1a4 plug-ins: port ifs-compose to GimpPlugIn and libgimp objects 2019-08-28 03:36:34 +02:00
Michael Natterer 8eb099a24c plug-ins, app: port selection-to-path to GimpPlugIn and libgmp objects
Remove the separate "advanced" procedure. With GParamSpec default
values the differance between normal and advanced is just
non-interactive vs. interactive.
2019-08-28 03:15:08 +02:00
Jehan cce5bbc344 plug-ins: port the core of foggify plug-in.
There are 2 TODOs to take care of here. First, there is no GUI yet for
the interactive mode which will just use the default values.
Second, the color argument is not working yet because I had issues
passing a GimpRGB as argument (ideally I should create a GimpParamRGB
with gimp_param_spec_rgb(), but since we still have the pygobject bugs
about manipulating GParamSpec data directly, I can't).

Anyway it works with default values, which is already a good first step.
:-)
2019-08-28 02:25:19 +02:00
Michael Natterer 605f349137 plug-ins: port web-browser to GimpPlugIn 2019-08-27 19:39:06 +02:00
Michael Natterer eae484e54a plug-ins: port web-page to GimpPlugIn and libgimp objects 2019-08-27 19:17:15 +02:00
Michael Natterer b6b84f7afa plug-ins: port the metadata plug-ins to GimpPlugIn and object 2019-08-27 18:28:56 +02:00
Michael Natterer 1178f54522 plug-ins: port script-fu to libgimp objects 2019-08-27 18:09:50 +02:00
Michael Natterer c940ca8f8a plug-ins: port file-mng to GimpPlugIn and libgmp objects
All file plug-ins ported \o/
2019-08-27 15:22:52 +02:00
Michael Natterer 10b798c198 plug-ins: port file-dds to GimpPlugIn and libgimp objects
This is such a monster, I'm sure I broke something here...
2019-08-27 14:43:38 +02:00
Michael Natterer 3d7c044181 plug-ins: port file-pdf-save to GimpPlugIn and libgmp objects 2019-08-27 14:12:50 +02:00
Michael Natterer 2adfa90cc4 plug-ins: somehow killed file-aa's attribution, put it back 2019-08-27 13:34:31 +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
Jehan bf79896db1 plug-ins: port (hopefully) missing Win32 screenshot code.
Seems I missed this part. Hopefully this is good now. This is untested,
not even a build test.
2019-08-26 16:50:25 +02:00
Michael Natterer 6e96490012 plug-ins: port file-aa to GimpPlugIn and libgimp objects 2019-08-25 19:53:02 +02:00
Michael Natterer 0ee329bd44 plug-ins: port file-gegl to GimpPlugIn and libgimp objects 2019-08-25 18:15:04 +02:00
Michael Natterer 5dd8add77a plug-ins: port file-fli to GimpPlugIn and libgimp objects 2019-08-25 16:05:41 +02:00
Michael Natterer bc1e611bf0 plug-ins: port file-sunras to GimpPlugIn and libgimp objects 2019-08-25 15:12:48 +02:00
Jehan 13ea5caec2 plug-ins: port file-openraster to Python 3 + new API.
Apart from porting, only code logics change is the whole
encode()/decode() code because it created a string vs bytes mess and the
zipfile API apparently didn't like to deal with bytes, even though the
docs say otherwise.
It's hard to test on my UTF-8 system, so please anyone working with
non-UTF-8 paths, we welcome reports if ORA load/save does not work
properly.

Other than this, load, save and load_thumb were all tested and working
properly so far.
2019-08-25 12:01:41 +02:00
Michael Natterer 7bc4e6eb6b plug-ins: port file-jp2-load to GimpPlugIn and libgimp objects 2019-08-24 20:55:54 +02:00
Michael Natterer 72df7883ef plug-ins: port file-dicom to GimpPlugIn and libgimp objects 2019-08-24 20:15:35 +02:00
Michael Natterer 8265cb8f9d plug-ins: port file-psp to GimpPlugIn and libgimp objects, untested 2019-08-24 19:52:36 +02:00
Michael Natterer cd4fbb6213 plug-ins: port file-pcx to GimpPlunIn and libgimp objects 2019-08-24 19:27:46 +02:00
Michael Natterer 7f65383ad4 plug-ins: port file-xpm to GimpPlugIn and to libgimp objects 2019-08-24 18:56:03 +02:00
Michael Natterer 0ae833b0e0 plug-ins: port file-tga to GimpPlugIn and libgimp objects 2019-08-24 18:34:53 +02:00
Michael Natterer 9847072978 plug-ins: port file-faxg3 to GimpPlugIn and libgimp objects
No idea if this works, I didn't find an example image.
2019-08-24 18:08:31 +02:00
Michael Natterer e6322e319c plug-ins: port file-fits to GimpPlugIn and libgimp objects 2019-08-24 17:49:58 +02:00
Michael Natterer 71d56d8e6f plug-ins: port file-bmp to GimpPlugIn and libgimp objects 2019-08-24 17:26:00 +02:00
Michael Natterer 2fd17029f4 plug-ins: port file-cel to GimpPlugIn and libgimp objects 2019-08-24 17:04:38 +02:00
Michael Natterer 44ebcee901 plug-ins: port file-xwd to GimpPlugIn and libgimp objects 2019-08-24 16:46:40 +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 ed041bff39 plug-ins: port file-html-table to GimpPlugIn and libgimp objects 2019-08-24 13:53:16 +02:00
Michael Natterer 5428cc60b0 plug-ins: port file-header to GimpPlugIn and libgmp objects 2019-08-24 13:41:48 +02:00
Michael Natterer 037e8a6e49 plug-ins: port file-csource to GimpPlugIn and libgimp objects 2019-08-24 13:33:54 +02:00
Michael Natterer 55049488dc plug-ins: port file-pnm to GimpPlugIn and libgimp objects 2019-08-24 13:18:49 +02:00
Michael Natterer ee5a93f368 plug-ins: port file-raw-data to GimpPlugIn and libgmp objects 2019-08-24 12:33:18 +02:00
Michael Natterer 3636541b42 plug-ins: port file-webp to GimpPlugIn and libgimp objects 2019-08-24 11:45:01 +02:00
Michael Natterer 9f3bc2bd7a plug-ins: port file-xbm to GimpPlugIn and libgimp objects 2019-08-24 10:58:34 +02:00
Michael Natterer e1c2150f64 plug-ins: port file-heif to GimpPlugIn and libgimp objects 2019-08-24 10:23:01 +02:00
Michael Natterer 23197cfa9b plug-ins: port file-pix to GimpPlugIn and libgimp objects 2019-08-24 03:02:13 +02:00
Michael Natterer 3bef94d56f plug-ins: port file-jpeg to GimpPlugIn and to libgimp objects 2019-08-24 02:33:45 +02:00
Jehan e8bbf42eba Issue #3841: double mnemonics.
I kept the 'i' as 'f' was already used for another widget.
2019-08-23 01:26:53 +02:00
Jehan 4942acbc46 plug-ins: animation-play ported to new GimpImage/Drawable objects. 2019-08-23 00:56:41 +02:00
Jehan 753434369b plug-ins: port file-svg to libgimp objects. 2019-08-23 00:36:57 +02:00
Jehan 858ab51f44 plug-ins: port file-gif-load to new libgimp objects. 2019-08-22 23:41:36 +02:00
Jehan 5e87258067 plug-ins: plugin-browser and procedure-browser don't need porting. 2019-08-22 23:30:19 +02:00
Jehan f9582f1a2f plug-ins: port file-pdf-load to libgimp objects. 2019-08-22 23:23:23 +02:00
Jehan 2211e4eb0e plug-ins: port file-wmf to libgimp objects. 2019-08-22 23:11:03 +02:00
Jehan 54dab3285d plug-ins: update/fix the 3 non-C goat-exercise.
The JS and Python 3 had to be ported to the new GimpImageProcedure API.

The Lua one was still using the old ID API hence was broken. Also not
sure why run_mode enum has become a string in Lua with the new
GimpImageProcedure API (probably some automatic conversion happening
during the C to Lua binding?), but well… it works like that, so what.

Sync also the late changes from the C goat exercise, like for instance
not returning an error when selection is empty as well as keeping the
order of calls to be the same across the 4 supported demo scripts.
2019-08-22 23:02:06 +02:00
Jehan 883fbd7b65 plug-ins: fixing automake warnings about source in subdirectories.
This fixes:
> warning: source file 'images/imagemap-icon-images.c' is in a subdirectory,
> but option 'subdir-objects' is disabled
And similar warnings.
2019-08-22 22:36:50 +02:00
Michael Natterer e1fe044779 plug-ins: minor follow-up to the icon include fix two commits below 2019-08-22 21:17:14 +02:00
Michael Natterer e146e4747a plug-ins: port file-xmc to GimpPlugIn and new API objects 2019-08-22 21:13:21 +02:00
Félix Piédallu 211e5f51a5 plug-ins: do not #include c autogenerated sources 2019-08-22 18:45:31 +02:00
Jehan 2d0584dc91 plug-ins: port file-psd to GimpImage/GimpDrawable. 2019-08-22 15:54:37 +02:00
Jehan 6e68f18685 plug-ins: port file-ps to GimpImage/GimpDrawable. 2019-08-22 15:54:37 +02:00
Jehan bbf90b3ba5 plug-ins: port film to GimpImage/GimpDrawable. 2019-08-22 15:54:37 +02:00
Jehan 3e06295adf plug-ins: port pagecurl to GimpImage/GimpDrawable. 2019-08-22 15:54:37 +02:00
Jehan 00e750776a plug-ins: port print to GimpImage/GimpDrawable/etc. 2019-08-22 15:54:36 +02:00
Jehan 962e8b995e plug-ins: port gfig to GimpImage|Drawable. 2019-08-22 15:54:36 +02:00
Jehan 7838c7f2b2 plug-ins: port fractal-explorer to GimpImage|Drawable. 2019-08-22 15:54:36 +02:00
Jehan 6db115e475 plug-ins: unit-editor does not need GimpImage porting.
It doesn't use any image/drawable, whatever.
2019-08-22 15:54:36 +02:00
Jehan e6b141ffe4 plug-ins: port file-tiff to GimpImage|Drawable|Vectors, etc. 2019-08-22 15:54:36 +02:00
Jehan adc4f8e589 plug-ins: port mail to GimpImage/GimpDrawable. 2019-08-22 15:54:36 +02:00
Jehan 8f34af49b7 plug-ins: port file-png to GimpImage/GimpDrawable. 2019-08-22 15:54:36 +02:00
Jehan 9f0dbb5759 plug-ins: port screenshot to GimpImage/GimpDrawable. 2019-08-22 15:54:36 +02:00
Jehan 0b64395fa6 plug-ins: port colormap-remap to GimpImage/GimpDrawable. 2019-08-22 15:54:36 +02:00
Jehan 1b6e6b9b53 plug-ins: port file-exr to GimpImage/GimpDrawable. 2019-08-22 15:54:36 +02:00
Jehan 3d4bf19bae plug-ins: port file-sgi to GimpImage/GimpDrawable. 2019-08-22 15:54:36 +02:00
Jehan 08849a584c libgimp: GimpItem now also belong to libgimp. 2019-08-22 15:54:36 +02:00
Jehan cfd30ec62a libgimp: s/gimp_image_new_by_id()/gimp_image_get_by_id()/
This means that images' ownership is not given to caller in particular.
libgimp will now keep a reference of all GimpImage-s it creates and
return this same reference if called again. It also means that you can
now compare images by pointer comparison (as 2 GimpImage objects
representing the same image ID will be equal).
Obviously as a side effect, gimp_image_list() is changed to (transfer
container) as you must only free the container now, not the elements.
Also various other functions creating new images are now (transfer none)
too.

Long-time plug-ins will have to be taken in consideration in a further
step (we currently never free GimpImage for destroyed images in
particular).
2019-08-22 15:54:36 +02:00
Jehan 8559cee053 plug-ins: improve parameter creation on Python 3 goat-exercise.
PyGObject seems to have at least 3 syntaxes to create object properties.
Though the one I used previously was apparently the recommended syntax,
it was clearly a bit messy and not clear. This alternative syntax ends
up much more compact, really look alike the C-style, which is a good
thing and is very visual. From what I can see, we should also override
the get|set_property() methods, but since we are not going to actually
set any value (this is only a workaround to make a GParamSpec), it seems
to work fine without.
2019-08-22 15:54:36 +02:00
Jehan c95e9334d1 plug-ins: port file-raw plug-ins to GimpImage/GimpDrawable. 2019-08-22 15:54:36 +02:00
Jehan e29cb0329c plug-ins: port file-compressor to GimpImage/GimpDrawable. 2019-08-22 15:54:36 +02:00
Jehan 3e636ba0c6 plug-ins: port file-desktop-link to GimpImage/GimpDrawable. 2019-08-22 15:54:36 +02:00
Jehan 0cb995e8a4 plug-ins: port file-gih to GimpImage/GimpDrawable. 2019-08-22 15:54:36 +02:00
Jehan d6365c778e plug-in: port file-gbr to GimpImage/GimpDrawable. 2019-08-22 15:54:36 +02:00
Jehan abd4d6fab8 plug-ins: port file-pat to GimpImage/GimpDrawable. 2019-08-22 15:54:36 +02:00
Jehan 0fa09282f2 plug-ins: port file-ico to the new GimpImage/GimpDrawable objects. 2019-08-22 15:54:36 +02:00
Jehan ee8b467e9f libgimp: GimpSaveProcedure() now uses GimpImage/GimpDrawable object...
... as parameters.
And GimpLoadProcedure() now expects the run() function to return a
GimpImage object.
2019-08-22 15:54:36 +02:00
Jehan 292b697f3e plug-ins: use GimpDrawable class in Python goat-exercise.
And re-enable it. Now it works fine!
2019-08-22 15:54:36 +02:00
Jehan 9b8f6089ce plug-ins: port JavaScript goat-exercise to new GimpImage API.
Note how much nicer it is in bindings!
2019-08-22 15:54:36 +02:00
Jehan 52811edcee plug-ins: C goat-exercise now ported to new GimpImage/GimpDrawable.
You'll notice that with the new class when used together with the new
GimpPlugIn API, it is not needed to allocate/destroy anymore the
GimpImage/GimpDrawable. These can be directly the parameters.
2019-08-22 15:54:36 +02:00
Jehan 433fcd4334 plug-ins: ported a few plug-ins to new GimpImage/GimpDrawable classes. 2019-08-22 15:54:36 +02:00
Jehan e0d50aa121 plug-ins: keep building all plug-ins with old API.
Build existing plug-ins with -DGIMP_DEPRECATED_REPLACE_NEW_API.
We will port the plug-ins one at a time to the new GimpImage API.
2019-08-22 15:54:36 +02:00
Michael Natterer 2b310999fc plug-ins: port file-wmf to GimpPlugIn 2019-08-20 10:22:27 +02:00
Michael Natterer 4c3f3c451b plug-ins: port file-pdf-load to GimpPlugIn 2019-08-20 02:32:15 +02:00
Michael Natterer 4cb4b3ef3a plug-ins: port all plug-ins to the new macros 2019-08-20 01:03:38 +02:00
Michael Natterer 1253faaab3 plug-ins: change all ported thumbnail loaders to GimpThumbnailProcedure 2019-08-19 14:04:00 +02:00
Michael Natterer d62e75a41f Move GimpParamSpecString from libgimp back to app
It's just too weird to be public. Remove its properties from the wire
protocol and from pluginrc. Instead, have all GParamSpecs' flags on
the wire and in pluginrc, so we can use stuff like
GIMP_PARAM_NO_VALIDATE.

Port the remaining few places to GIMP_PROC_ARG_STRING().

I'm sure something is broken now wrt UTF-8 validation,
will add tighter checks in the next commit.
2019-08-19 12:54:52 +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 9cabc8c8d0 libgimp, plug-ins: use the new macros everwhere
Except for gimp_param_spec_string() which is on its way back to the
core.
2019-08-19 10:02:07 +02:00
Michael Natterer 64920f01eb plug-ins: port file-svg to GimpPlugIn 2019-08-18 23:47:03 +02:00
Michael Natterer 1e49befef3 plug-ins: link file-svg against GEGL, it uses it indirectly 2019-08-18 23:19:58 +02:00
Jehan 045d03a3de plug-ins: some very minor style (alignment) fixes. 2019-08-18 22:37:31 +02:00
Jehan 4799619bbc plug-ins: fix various plug-ins ported to GimpImageProcedure.
All the GimpImageProcedure must remap the order of their additional
arguments (i.e. subtracts 3).
This fixes the other plug-ins changed in commit 15019fef52 which had
such additional arguments.
2019-08-18 22:26:33 +02:00
Jehan 5b3e8e1f05 plug-ins: fix pagecurl arguments order after GimpImageProcedure port.
The additional arguments are ordered down -3.
2019-08-18 21:53:45 +02:00
Jehan 011ae15460 plug-ins: canonicalize curve-bend.
Since commit 11ce199cea, we reject non-canonical procedure name. We
have one such in our plug-ins in curve-bend. Fix this.
2019-08-18 21:50:14 +02:00
Michael Natterer b444954d03 plug-ins: port file-ps to GimpPlugIn 2019-08-18 18:28:32 +02:00
Michael Natterer 17648ead86 plug-ins: port file-fig-load to GimpPlugIn
And also fix a glitch in my earlier g_strlcpy() commit that would keep
most GIFs from being loaded, oops.
2019-08-18 15:04:57 +02:00
Michael Natterer 15019fef52 plug-ins: port many plug-ins from GimpProcedure to GimpImageProcedure
Also move the call to set_icon_name() after set_menu_label(), all
ported plug-ins should look the same so we are a good example for copy
and paste ;)
2019-08-18 13:45:58 +02:00
Michael Natterer d89e6ca7e9 plug-ins: port goat-exercise-c to GimpFileProcedure
and fix loading of the plug-in source code into the text view. Also,
ancountering a zero-sized selection is not an error, but simply a
successful nop.
2019-08-18 13:14:27 +02:00
Michael Natterer 293d909cf4 plug-ins: port file-psd to GimpPlugIn
and remove all save arguments, they are completely unused, wtf?
2019-08-18 00:26:13 +02:00
Jehan 91bde62b08 plug-ins: make mail more robust.
I got a 'Invalid cross-device link' error (errno 18) on my system. Let's
add some redundancy and try g_file_move() if g_rename() failed.
This at least fixed my case.
2019-08-17 10:54:03 +02:00
Michael Natterer 253a163c3f plug-ins: port file-tiff to GimpPlugIn 2019-08-16 22:55:56 +02:00
Michael Natterer 732d7c6a27 plug-ins: port file-png to GimpPlugIn
This commit removes all save procedures except gimp-png-save with all
parameters, and kills the default value handling procedures.

Default handling is now broken for NONINTERACTIVE use, but we will
handle this much better and consistent for all save procedures inside
GimpSaveProcedure
2019-08-16 21:55:34 +02:00
Jehan 0abdbebaad plug-ins: fix and install the Lua goat-exercise.
So procedure:new_return_values() just seems broken with LGI. It doesn't
even look like it reaches the C code.
Anyway we can also just reconstruct the GimpValueArray, which works
fine. We now have official support for Lua plug-ins!
2019-08-16 19:46:32 +02:00
Jehan bbfa8f8e3e plug-ins: Lua goat-exercise now showing its own source too. 2019-08-16 17:36:00 +02:00
Jehan a09b7a9c92 plug-ins: add a Lua goat-exercise.
It is working fine except that it crashes at the end when running
procedure:new_return_values(). I have not understood why yet, but it may
be a bug in lua LGI. Maybe we'll have to create the returned
GimpValueArray by hand in Lua.
Also the dialog does not show the source yet.

This is not installed yet (and lua interpreter is not checked at
configure) because of these issues which I will have to figure out. In
the meantime, I commit this work-in-progress.
2019-08-16 17:05:18 +02:00
Jehan ef5c091e58 plug-ins: add Python and JavaScript files to the DIST.
So it seems that whatever is in _SCRIPTS is not in the distribution by
default (I suppose the reason is that even scripts can be generated). So
let's add the non-generated scripts to EXTRA_DIST.
2019-08-16 14:53:19 +02:00
Michael Natterer ebc09985b0 plug-ins: port file-sgi to GimpPlugIn 2019-08-15 21:37:43 +02:00
Michael Natterer 7edd28706f file-exr: use gimp_pdb_get_last_error() instead of gimp_get_pdb_error() 2019-08-15 19:03:09 +02:00
Michael Natterer c6fa23c22c plug-ins: port file-exr to GimpPlugIn 2019-08-15 19:00:10 +02:00
Michael Natterer 652fd75891 Rename GIMP_TYPE_INT8_ARRAY to GIMP_TYPE_UINT8_ARRAY
and GimpParamSpecInt8Array to GimpParamSpecUInt8Array
2019-08-15 15:04:34 +02:00
Michael Natterer 5a09523214 Remove GIMP_TYPE_INT32 and GimpParamSpecInt32
Use gint and GParamSpecInt instead.
2019-08-15 14:04:56 +02:00
Michael Natterer 1bf90ec77f Remove GIMP_TYPE_INT8 and GimpParamSpecInt8
Use guchar and GParamSpecUChar instead.
2019-08-15 13:34:11 +02:00
Michael Natterer b3a05a9f1d plug-ins: port colormap-remap to GimpPlugIn 2019-08-15 12:47:31 +02:00
Michael Natterer 5c4fa2de51 plug-ins: port screenshot to GimpPlugIn 2019-08-15 11:48:05 +02:00
Michael Natterer b007269729 Use g_strlcpy() instead of strncpy() everywhere
except where I didn't understand the code after 10 seconds of
looking..
2019-08-14 23:52:38 +02:00
Michael Natterer bb8d18ed39 plug-ins: port mail to GimpPlugIn 2019-08-14 22:06:19 +02:00
Michael Natterer b6ca0c4433 plug-ins: port unit-editor to GimpPlugIn 2019-08-14 20:24:02 +02:00
Michael Natterer ff5dd3f3cf plug-ins: port animation-play to GimpPlugIn 2019-08-14 20:03:06 +02:00
Michael Natterer 30c3fd4de5 plug-ins: port fractal-explorer to GimpPlugIn 2019-08-14 18:57:16 +02:00
Michael Natterer 0b5f5bf70a plug-ins: port gfig to GimpPlugIn 2019-08-14 12:58:27 +02:00
Michael Natterer 037421dee0 plug-ins: port film to GimpPlugIn 2019-08-14 12:39:07 +02:00
Michael Natterer 0bfc4cf7b2 plug-ins: port all file-raw plug-ins to GimpPlugIn 2019-08-14 01:34:11 +02:00
Michael Natterer 966c49d08e plug-ins: remove some crack code from curve-bend
containing the last use of gimp_run_procedure().
2019-08-14 00:11:21 +02:00
Michael Natterer 10f1fcf066 plug-ins: port file-ico to GimpPlugIn 2019-08-14 00:06:22 +02:00
Michael Natterer 29165fde7f plug-ins: port file-gih to GimpPlugIn 2019-08-13 22:53:04 +02:00
Michael Natterer 358bbd932c plug-ins: port print to GimpPlugIn 2019-08-13 19:41:52 +02:00
Michael Natterer bc5cfaea25 plug-ins: port file-compressor to GimpPlugIn 2019-08-13 19:10:55 +02:00
luz.paz c1585d609b Misc typo fixes in plug-ins/ 2019-08-13 11:50:51 -04:00
Michael Natterer 1e717a0dc6 plug-ins: port file-gbr to GimpPlugIn, and clean up file-pat a bit 2019-08-13 13:36:20 +02:00
Michael Natterer 0491f653fa plug-ins: port help-browser to GimpPlugIn 2019-08-13 00:38:02 +02:00
Ell 21649c5eaa Issue #3341 - Add Bevel doesn't work for high thickness values
Something during the port to gimp-drawable-edit (commit
233ac80de1) broke add-bevel.scm when
the thickness is high enough for the selection to become empty.

Add an explicit check for a selection while constructing the bump-
map layer.
2019-08-12 22:18:18 +03:00
Michael Natterer 103a7e4fc3 plug-ins: port script-fu to GimpPlugIn
This probably has some bugs, but worked flawlessly in my tests...
2019-08-12 20:49:08 +02:00
Michael Natterer 85d9a291a2 script-fu: undeprecate slide.scm 2019-08-12 20:08:55 +02:00
Michael Natterer 1c9b3c7055 libgimp: add gimp_pdb_get_last_error() and _get_last_status()
and move the old API to gimplegacy.[ch].
2019-08-11 16:41:58 +02:00
Michael Natterer cd836e9d96 libgimp: add gimp_file_procedure_set_handles_uri()
Implementing a shiny new GimpFileProcedure doesn't mean the libraries
we use to load/save files are automatically capable of handling remote
files, so we still need this flag.
2019-08-11 12:52:28 +02:00
Michael Natterer f042d21989 plug-ins: port file-desktop-link to GimpLoadPocedure 2019-08-11 12:31:41 +02:00
Michael Natterer c377644ba5 plug-ins: port file-pat-save to GimpSaveProcedure 2019-08-10 22:01:37 +02:00
Jehan f9f144b4bc configure: add a check for gjs (JavaScript interpreter with GI binding).
As discussed on IRC, I am not sure if really this is needed, since
theoretically we now have support for a whole bunch of languages without
doing anything (languages supported by GObject Introspection) and we are
not going to check for all of them.
Yet since now we install one JS plug-in, let's still do a quick check.
We'll see later if we want to change how we handle supported script
languages.
2019-08-09 18:40:14 +02:00
Jehan c1f28f7e8c plug-ins: rename the C goat exercise to goat-exercise-c.
Makes for consistent naming of the different demo code we have there.
2019-08-09 15:48:25 +02:00
Jehan d0be3d3e0c plug-ins: get rid of getCurrentPath() in goat-exercise-gjs.js.
The file path was already the same as ARGV first argument (i.e.
System.programInvocationName as I added this myself!). Why did I even
bothered with this annoying trick!
This makes the code much simpler, which is better for demo code.
2019-08-09 15:48:25 +02:00
Jehan 9ed4dd5dde plug-ins: add a goat-exercise-py3.py.
Right now it is not working, always because of the same bug about not
being able to create GParamSpec (pygobject#227). As a consequence, I
tried a workaround by creating object properties and using their spec
instead. But it turns out that in pygobject, I cannot create random
properties for custom types (well I could for boxed types or GObject
subclasses, not for GimpImageID or GimpDrawableID). Cf. pygobject#357.
So I am stuck again.

Anyway I still push this demo file which would just work as it is, if we
coult at least got the image/drawable ID.
I comment out the Makefile.am part for now until we can get the issues
sorted out.
2019-08-09 15:48:25 +02:00
Jehan 9454567e8c plug-ins: pre-load Babl module in Python console. 2019-08-09 14:41:40 +02:00
Michael Natterer 55940b733b libgimpwidgets: add a GDestroyNotify for gimp_help_connect()'s user_data 2019-08-09 13:11:30 +02:00
Michael Natterer fd55514416 plug-ins: eek, twain calls gimp_main() directly
Make it call gimp_main_legacy() instead.
2019-08-09 00:50:32 +02:00
Michael Natterer 155bc75a75 libimp*, app: get rid of inline pixbufs in the API and in pluginrc
because they are deprecated.

Change GIMP_ICON_TYPE_INLINE_PIXBUF to GIMP_ICON_TYPE_PIXBUF and the
libgimp API to (icon-name, GdkPixbuf, GFile). Use the file's uri and a
PNG blob of the pixbuf to pass around on the wire and for storage in
pluginrc.
2019-08-09 00:16:35 +02:00
Jehan 6ffd25b9f7 plug-ins: use new procedure.set_icon_name() in JavaScript demo. 2019-08-08 17:43:13 +02:00
Jehan 88ff7ca258 plug-ins: nearly-complete goat-exercise in JavaScript.
Only missing parts are:
- localization.
- help function and id unset.
- gimp_procedure_set_icon() should probably be reviewed for proper
  introspection.
- Finally there is a String() conversion which raises a warning, but I
  couldn't find the proper standard replacement code.
Other than this, the goat-exercise was totally reproduced in JavaScript.
2019-08-08 11:57:23 +02:00
Jehan f625e2ddfb menus, plug-ins: move script development related plug-ins in a...
"Development" submenu. Also get rid of the "Languages" placeholder.
2019-08-08 11:17:07 +02:00
Michael Natterer 169f98f915 libgimpwidgets: add GDestroyNotify to gimp_int_combo_box_connect() 2019-08-08 00:22:15 +02:00
Michael Natterer c6bcb3114f libgimp: add GDestroyNotify for image and item combo box data 2019-08-07 23:16:25 +02:00
Michael Natterer cbefd8e5bb libgimpwidgets: add GDestroyNotify for gimp_query_foo_box() user_data
This is ugly shit that should go down the canal but let's just fix
these GI warnings.
2019-08-07 22:48:06 +02:00
Jehan faf2db71cd plug-ins: improve Makefile.am of python/ subdir.
The old rules were crap and basically copying the scripts in build
folder before installing. Get proper/simpler rules.
2019-08-07 19:52:09 +02:00
Jehan 863c0849c8 desktop, plug-ins, tools: update various .gitignore. 2019-08-07 19:20:52 +02:00
Michael Natterer 7f0c801559 plug-ins: link goat-exercise against GTK 2019-08-07 18:47:24 +02:00
Jehan 6ed3b4898c plug-ins: goat-exercise improved to show a dialog.
This just adds a dialog before running the actual processing of data.
- it also shows what the run-mode is for;
- the purpose of the plug-in becomes explicit (plug-in creation
  documentation);
- it shows some GTK+ code too.
- last but not least, the code is actually shown for people to study,
  with a button to access the last version of the code on gitlab.

This makes the plug-in a lot more useful and understandable this way.
Other exercise plug-ins in other languages will have to do the same
thing.
2019-08-07 16:13:49 +02:00
Jehan 6b17c942cf plug-ins: adding a hello-world plug-in in javascript.
It is not installed yet, I am just committing my first version. Further
version should look like goat-exercise as an example of what must be
done in javascript.
Also the plug-in stopped working with one of the recent libgimp commits,
without any change in the plug-in code. This will need to be
investigated before installing.
2019-08-07 00:53:17 +02:00
Jehan fc33489223 plug-ins: move goat-exercise to a goat-exercises/ directory.
We will fill this up with more examples of plug-ins in other languages.
Also we will improve a bit the examples to redirect people to source
code so that they understand what these plug-ins are.
2019-08-07 00:00:20 +02:00
Jehan f16ad87f2d plug-ins: add .gitignore files. 2019-08-06 23:22:18 +02:00
Michael Natterer caa61eef4f libgimp, pdb: remove gimp_run_procedure_with_array() from gimp.[ch]
and add it to gimplegacy.[ch] as gimp_run_procedure_array().
Regenerate all PDB wrapper accordingly.
2019-08-06 21:44:26 +02:00
Michael Natterer d6d987ebac plug-ins: port plugin-browser to GimpPlugIn 2019-08-06 19:13:06 +02:00
Jehan bfda31a67e configure: fix the Python checks.
1/ First I realize we were still using AM_PATH_PYTHON() and not
   AM_PATH_PYTHON3().
2/ We don't need to check anymore for pygtk, pycairo, nor do we need
   Python headers. Everything is now taken care of by GObject
   Introspection and we have nothing else to build GIMP-side.
3/ Change --enable-python into --with-python. We don't actually build
   anything now. There is no Python support to enable or disable
   anymore. We simply install Python plug-ins or not. The 3 values are
   "yes" (default, configure breaks if a Python 3 interpreter is not
   found), "no" (Python plug-ins are not installed, not recommended) and
   "force" (install Python plug-ins anyway even if an interpreter is not
   found; this can be useful especially for cross-compilation since
   Python is not useful at build-time anymore).

   Note that --with-python=force, if an interpreter is not found, the
   file `pygimp.interp` won't be installed. This is not a problem at all
   if the interpreter can be found at runtime the standard way.
   Otherwise packagers should add themselves a pygimp.interp file with
   the known interpreter path.
2019-08-06 18:35:53 +02:00
Jehan dc8f9dd168 plug-ins: add interactive run mode for palette-offset.
In interactive run-mode, the offset amount can be selected through a
small dialog box.
Only a WITH_LAST_VALS mode is still to be done.
2019-08-06 17:31:30 +02:00
Michael Natterer d8640d5b59 plug-ins: port procedure-browser to GimpPlugIn 2019-08-06 16:30:41 +02:00
Michael Natterer 05baadcd1d pdb: rename the "procedural_db" PDB group to just "pdb" 2019-08-06 12:51:56 +02:00
Jehan 82ada55b99 plug-ins: port palette-offset to Python 3.
Oups, I left the plug-in as Python 2. This was still a good
proof-of-concept that GIMP 3 will support as well Python 2 and Python 3
(even though Python 2 is end-of-life soon anyway).
2019-08-06 01:03:31 +02:00
Jehan dca353f8cd plug-ins: port palette-offset to new API.
This first version will just offset by 1 in interactive mode, by
default. The GIMP 2 version used to have a GUI, but it was not created
by the plug-in itself. I am guessing that maybe our Python wrapper used
to create GUI by default.
If so, this will have to change. Python plug-ins will be responsible of
their own GUI, just like C plug-ins.
2019-08-06 00:40:37 +02:00
Jehan 35d4b68edc plug-ins: add a "palette" argument to palette-to-gradient.
Older palette-to-gradient used to have a palette argument. Bring it
back. The logics is that if the string is empty or None, the procedure
will use the currently selected palette. Otherwise it will try to
transform the named palette into a gradient and will fail with an error
if this palette does not exist.
2019-08-06 00:29:33 +02:00
Michael Natterer 550ec68cff libgimp: reorder functions and members of GimpProcedure
to make more sense, as long as the file has little git history.
2019-08-05 23:01:25 +02:00
Sabri Ünal e93a20e7ac Issue #3112 - Missing mnemonics.
(cherry picked from commit 30e4a7ee5e)
2019-08-05 22:44:36 +02:00
Jehan aa6a1d369c plug-ins: use GtkSettings values to determine whether to use header bar.
As we do in other parts of the code.
Also applies the same thing to the console dialog itself.
2019-08-05 16:10:12 +02:00
Jehan 0af32861e7 plug-ins: GimpProcBrowserDialog with "use-header-bar" in Python-console.
We have code for this in gimp_proc_browser_dialog_new(), but it cannot
be moved in the object init() because this is a construction-time only
property. So this needs to be passed from the python call too.
2019-08-05 15:16:32 +02:00
Michael Natterer acbe229427 libgimp: make gimp_proc_view_new() show both new- and old-style args
And reduce its API to just (proc-name, menu-path), it can look up all
the shit from the PDB itself.
2019-08-05 14:17:18 +02:00
y-guyon 8f828d1899 plug-ins: WebP: save_dialog() before gimp_export()
As mentioned in issue #1777, exporting non-animated WebP images was
only keeping the current layer.
Mimick file-gif-save.c: display the encoding settings pop-up earlier
so that gimp_export_image() can merge the layers unless "As Animation"
is enabled. Call gimp_image_get_layers() directly in save_image() in
case the layers were merged (for clarity because layers are used only
for animations).
2019-08-05 09:46:46 +00:00
Michael Natterer fad59611bc libgimp: port gimpprogress to the new plug-in API, untested
It's tested to still work when using the old API though.
2019-08-04 17:51:59 +02:00
Michael Natterer b6033684ff plug-ins: add all brush, pattern etc. select buttons to pagecurl
They do nothing but testing themselves with the new plug-in API, this
is of course temporary.
2019-08-04 17:02:21 +02:00
Øyvind Kolås 1661aab620 plug-ins: link dds plugins against libm 2019-08-04 14:22:09 +02:00
Jehan c822350fb3 plug-ins: forgot to change run() signature to new API in python-console. 2019-08-04 12:22:01 +02:00
Michael Natterer eaf5c792bf plug-ins: port pagecurl to the new API, to have a GUI plug-in to test 2019-08-03 17:10:33 +02:00
Niels De Graef 5f92ced1f3 Add (nullable) if applicable
Basically this commit makes sure that all return values that are marked
as "Returns:" also have a `(nullable)` annotation if it is mentioned on
the same line that NULL can also be returned.

This will prevent a few problems in GObject-introspection.
2019-08-03 07:53:47 +00:00
Niels De Graef 1dda60154c Use "Returns:" to annotate return values
To be able to annotate return values through GObject-introspection, you
need to make sure it is tagged with `Returns:` and not something else.
2019-08-03 07:53:47 +00:00