Commit Graph

44199 Commits

Author SHA1 Message Date
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 c2e5374845 pdb, libgimp: make all PDB wrappers use GimpPDB to run procedures 2019-08-06 21:34:00 +02:00
Michael Natterer 9a027140c8 libgimp: add read- and write-channel construct properties to GimpPlugIn
and change all GimpPlugIn-based code to get the channels from the
plug-in singleton instead of from the global variables.
2019-08-06 21:29:48 +02:00
Stas Solovey c65b507416 Update Russian translation 2019-08-06 19:01:13 +00:00
Jehan b20aab0236 libgimp: add annotations to gimp_pdb_run_procedure_array().
Especially as an example of setting a (rename-to) since variable
arguments are not introspectable, hence gimp_pdb_run_procedure() won't
be available for non-C plug-ins.
2019-08-06 19:29:00 +02:00
Michael Natterer d6d987ebac plug-ins: port plugin-browser to GimpPlugIn 2019-08-06 19:13:06 +02:00
Michael Natterer 84cb07f995 libgimp: add more comfortable ways to run procedures to GimpPDB
return_vals = gimp_pdb_run_procedure (pdb, "procedure-name",
                                      G_TYPE_STRING,  "string arg",
				      G_TYPE_INT      23,
				      G_TYPE_BOOLEAN, FALSE,
				      G_TYPE_NONE);
2019-08-06 19:13:06 +02:00
Michael Natterer 8860d78979 libgimp: more progress on the GimpPDB object
- add gimp_pdb_run_procedure()
- hide more functions in gimppdb_pdb.[ch], and add proper API
- add gimp_get_pdb() which returns the singleton
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 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