Commit Graph

44461 Commits

Author SHA1 Message Date
Michael Natterer 18c95e6fac libgimp: g_object_get() wants a pointer to the variable, gah... 2019-08-24 02:33:08 +02:00
Michael Natterer 773586f0c4 libgimp: make gimpgpparams-body.c identical for app/ and libgimp/ again
Use direct GType comparisons where possible, special case layer
because it has core subclasses but only one PDB type, special case
display because it's not visible from app/plug-in/, make code for
GPParamDef and GPParam look the same.
2019-08-23 23:31:19 +02:00
Michael Natterer 7201d48231 Get rid of capitalized "ID" in function and variable names
and use "id" instead.
2019-08-23 22:23:23 +02:00
Michael Natterer 75bf3865b8 libgimp: memory/lifecycle manage the new libgmp proxy objects
Turn GimpPlugIn into the main factory for all proxies and keep the
main hash tables there. The hash tables keep the initial reference.

For each GimpProcedure::run(), have s "sub-factory" which hands out
proxies to the actual procedure code. Each run() has hash tables of
its own which hold additional references. When run() is done, get rid
of its hash tables and their references, *and* drop the main plug-in
reference counts from the global hashes if the proxies' refcount has
dropped to one.
2019-08-23 17:30:04 +02:00
Anders Jonsson e3fdf254e0 Update Swedish translation
(cherry picked from commit 20533c8567)
2019-08-23 12:04:48 +00:00
Jehan de7447d828 libgimp: update def files. 2019-08-23 01:45:01 +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
Øyvind Kolås fe3e945154 configure,app: depend on babl-0.1.72 2019-08-22 23:15:43 +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 a04e287966 libgimp: fold gimpplugin-private.c into gimpplugin.c
having that separation was a bad idea in the first place. Private,
really private, totally private in a separate file? just merge them.
2019-08-22 22:24:33 +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 3b5bc9f0b7 gitlab-ci: don't use mypaint-brushes from Archlinux.
If I get it correctly, archlinux bumped the mypaint-brushes package to
v2, which broke our CI. The v1 and v2 brushes are not the same, and they
are not even compatible (GIMP only supports v1 brushes so far). These
should be different packages, hence the incremented major versionning.
For the archlinux change, see also:
https://git.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/mypaint-brushes&id=dfd032b3aab40a46c751bd47713fb82bf11bd984

Let's just install the brushes ourselves from the correct branch.

With this kind of changes, as well as the weird patches they do when
they rename the pkg-config file of libmypaint, I think we should
consider not rely on this distribution for our CI.
2019-08-22 17:22:38 +02:00
Jehan 899cf96ec5 libgimp: make sure gimp_item_get_by_id() allocates the right class.
It is theoretically possible for an id to be reused. Normally here this
should not happen, since the previous item would have been removed from
the hash table anyway, when it got destroyed. Let's still be thorough.
2019-08-22 15:54:37 +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 d15388c8c9 libgimp: s/gimp_display_new_by_id/gimp_display_get_by_id/
GimpDisplay objects now also belongs 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 7f91f6bc25 libgimp: GimpImageProcedure now uses GimpImage/GimpDrawable too. 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