Commit Graph

43940 Commits

Author SHA1 Message Date
Jehan 079027fd03 m4macros: fix python3dev.
A quote in the comment section of the Python 3 test program was breaking
the AM_PYTHON3_CHECK_VERSION macro.
2019-08-06 18:20:37 +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
Jehan 61c11b04c1 m4macros: Windows may have a versioned directory for headers.
Cf !84. We don't want to just replace the old path without versionned
python, because I assume it has been set for a reason. So there may be
machines with a versionned python path, others without. Let's test both
on Windows.
2019-08-06 16:26:27 +02:00
lillolollo 4d74452444 fix gtk version 2019-08-06 13:46:53 +00:00
Michael Natterer 468276e4d2 pdb: remove the section docs from unit.pdb
The functions are all private and the section is already documented in
libgimpbase.
2019-08-06 12:55:34 +02:00
Michael Natterer 05baadcd1d pdb: rename the "procedural_db" PDB group to just "pdb" 2019-08-06 12:51:56 +02:00
Michael Natterer 450a9f90b4 libgimp: add a GimpPDB class and subclass GimpProcedure as GimpPDBProcedure
The idea is that we already have a GimpProcedure object in libgimp
which has name, help, blurb, arguments, return values and everything,
so we really don't need a parallel API to query PDB procedures for
their properties.

- make run() a virtual function of GimpProcedure
- move GIMP_PDB_ERROR to GimpPDB
- GimpPDBProcedure is a trivial subblass which populates
  GimpProcedure's members by querying the PDB.
- make "plug-in", "procedure-type" and "name" construct-only
  properties of GimpProcedure.

This is all work in progress.
2019-08-06 12:22:23 +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
Kristjan SCHMIDT 718941a567 Update Esperanto translation 2019-08-05 21:47:11 +00:00
Jehan 17eb4c551f Revert "libgimpbase: fix/improve docs/annotations."
This partly reverts commit d999248d70.

The GimpStringArray is still very weirdly handled, in particular
regarding the difference of processing with static_data set or not.
Still this g_return_val_if_fail() was making more problems. It may come
back but will need more coding to handle the side effects.
2019-08-05 23:43:44 +02:00
Michael Natterer eacda4bb50 libgimp: remove includes and add "Since: 3.0" in gimpprocecure.c 2019-08-05 23:33:49 +02:00
Michael Natterer eaefe4f9d9 libgimp: fail gimp_procedure_new() on non-canonical procedure names 2019-08-05 23:22:39 +02:00
Michael Natterer 2f3a83754f libgimpbase: add gboolean gimp_is_canonical_identifier() 2019-08-05 23:22:06 +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
Michael Natterer 6cf1ec8200 libgimp: separate more new from old code by duplicating more logic in GimpPlugIn 2019-08-05 22:37:26 +02:00
Jehan 814ff02ab4 INSTALL: add GObject Introspection dependencies. 2019-08-05 20:58:07 +02:00
Jehan ddd726e253 libgimpwidgets: add some annotations.
Fix some (transfer) warnings.
2019-08-05 17:13:59 +02:00
Jehan c90287ecf5 Issue #3746: Problem with automake creating directories $(top_srcdir).
See upstream report: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=13928
We are not making automake 1.16 a requirement as it is just too recent
and we don't want to break build on old machines. I will want to make a
better fix later.
For the time being though, at least let's test first the higher automake
version, then down to minimum requirement, rather than test first
required version.
2019-08-05 17:03:57 +02:00
Jehan 4a6b58507b libgimp, libgimpmath, libgimpwidgets: update def files.
So many things moved in the last few days, and we just didn't think of
updating these.
2019-08-05 16:55:35 +02:00
Jehan f4f63dad9c libgimpmath: remove gimpmath.h from introspection.
This header is just full of macros and GI doesn't introspect macros
anyway. Yet it was still bothering us with warnings.
2019-08-05 16:43:30 +02:00
Jehan fead2f7d9d libgimpbase: fix broken annotation.
s/default_/default_value/
2019-08-05 16:41:44 +02:00
Jehan d999248d70 libgimpbase: fix/improve docs/annotations.
Our GimpStringArray is so weird. We are obviously expecting it to be
NULL-terminated since, when we duplicate the data, we add one value.
Yet we were not checking that the stored data was NULL-terminated, in
particular when the string array is created with static data (in which
case, we use the input data as-is, without re-allocating).

Note that this doesn't fix the type mismatch Gimp.StringArray vs
Gimp.Array when introspecting.
2019-08-05 16:29:52 +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
Michael Natterer f4b2cda964 Issue #3753 - Gimp master don't build on mingw-w64 errors on...
...gimp-shm.c

Fix some stuff I had copied blindly because it's not built on
my machine.
2019-08-05 16:02:38 +02:00
Michael Natterer d5fbbf3f49 libgimp: #include <sys/types.h> in gimp-debug.c 2019-08-05 16:00:02 +02:00
Michael Natterer 254271971e libgimp*: more docs and annotations 2019-08-05 15:57:11 +02:00
Jehan 515bfe94e3 libgimpbase: add annotations to several functions.
Not all of the public functions in the file, but at least the ones with
warnings.
2019-08-05 15:43:35 +02:00
Michael Natterer c6236ac140 pdb, libgimp: more docs and annotations 2019-08-05 15:31:43 +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
Jehan a76c9305bb libgimp: run the first search of GimpProcBrowserDialog in init().
Otherwise, if run in gimp_proc_browser_dialog_new(), this initial search
does not happen when constructing with g_object_new(). This is
especially bad for non-C plug-ins as gimp_proc_browser_dialog_new() is
not introspectable because of variable arguments.
2019-08-05 15:12:16 +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
Michael Natterer 6c18492668 app, libgimp: support GParamParam as a GParamSpec
also add forgotten support for GimpParamEnum.
2019-08-05 14:16:09 +02:00
Michael Natterer 7764f8b34b libgimpbase: add support for GParamParam in GPParamDef too
to describe param specs that describe param specs, yay.
2019-08-05 14:12:19 +02:00
Michael Natterer a6516e5097 app, libgimp: support GParamUInt on the wire 2019-08-05 12:47:05 +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 9969dd8b03 authors.xml: add Niels De Graef 2019-08-05 10:51:47 +02:00
Michael Natterer c8f38810d1 pdb: add gimp_procedural_db_proc_argument() and _return_value()
Which return proper GParamSpecs. Incuding some useless testing code in
gimp_procedural_db_proc_info(), to make sure things work, will go away
again soon.
2019-08-05 10:48:23 +02:00
Michael Natterer aa505b43dc app, libgimp*: add protocol support for GValues holding a GParamSpec
so we can have PDB introspection procedures for the new plug-in API.
2019-08-05 09:07:45 +02:00
Niels De Graef e77382ee75 docs: Fix warnings for annotations
Right now, we get the following warnings when building the docs:

> gtk-doc.xsl: For acronym (nullable) no value found

This is because we're not adding the generated annotation glossary to
the docs sgml (presumably because we didn't need it as we didn't use
GObject-Introspection yet). This commit adds those lines and thus fixes
the warnings.
2019-08-05 07:05:37 +00:00
Michael Natterer 32823f1709 libgimpbase: reorder types and structs in gimpprotocol.h
so the next commit becomes more readable.
2019-08-04 23:59:25 +02:00
Michael Natterer 21d63d6c65 pdb: fix the names of the oilify compat PDB wrappers 2019-08-04 23:31:14 +02:00
Michael Natterer 8c1a43dff7 libgimp: move the debug code to new private files gimp-debug.[ch] 2019-08-04 23:26:31 +02:00
Michael Natterer a74f4de81e libgimp: some random minor cleanups 2019-08-04 23:02:42 +02:00
Michael Natterer 888c42fbb8 libgimpbase: remove the gimp protocol mutex and gp_lock()/gp_unlock()
The protocol is supposed to be used recursively, the locks just
deadlock in some situations. Threaded use of the wire protocol is
simply forbidden.
2019-08-04 22:42:15 +02:00
Michael Natterer 5ac8b70e47 pdb: generate the (array length=foo) annotation with less hacks
and more important: correctly.
2019-08-04 22:24:11 +02:00
Michael Natterer 360314eda7 pdb: fix generation of "Returns:" to not line-wrap annotations
Also generate comments like "Must be freed with g_free()" for all
return values instead of manually and inconsistently having them on
some return values only.
2019-08-04 22:09:04 +02:00