Commit Graph

1254 Commits

Author SHA1 Message Date
Michael Natterer 0029760e2e plug-ins: add some missing types to script_fu_marshal_procedure_call()
Scripts must be able to pass values to procedures even if they have no
idea what the actual parameter type is (item, uchar, layer mask), to
the script it's all just numbers anyway.
2019-09-17 21:42:10 +02:00
Félix Piédallu 65eff6f150 Meson port. 2019-09-11 16:42:04 +02:00
Michael Natterer 453b4f4aa2 pdb: add gimp_pdb_set_proc_menu_label()
and all the needed code in libgimp/ and app/ to set a plug-in
procedure's menu label using the new API. Remove the menu label from
GPProcInstall.
2019-09-08 17:30:54 +02:00
Michael Natterer 33c84ceb08 plug-ins: don't set a NULL menu label in script_fu_script_install_proc() 2019-09-08 17:27:27 +02:00
Sabri Ünal 2e766f67d4 Missing mnemonics on several dialogs
paste as brush, paste as pattern, select to new brush, select to new pattern
fill selection outline, fill path, stroke selection, distort, rounded rectangle
indexed color conversion, merge visible layers, new guide, new guide (by percent)
image properties, newsprint, fractal explorer, sample colorize, new layer

metadata editor (just a button), spyroplus (only common buttons)
2019-09-05 22:41:19 +03:00
Michael Natterer 3fd3344f80 plug-ins: script-fu lost all support for images, layers etc.
due to the recent change to actual objects instead of IDs,
so add object support to script_fu_marshal_procedure_call().
2019-09-04 10:28:50 +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 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 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
Michael Natterer 1178f54522 plug-ins: port script-fu to libgimp objects 2019-08-27 18:09:50 +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 4cb4b3ef3a plug-ins: port all plug-ins to the new macros 2019-08-20 01:03:38 +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 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 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 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
luz.paz c1585d609b Misc typo fixes in plug-ins/ 2019-08-13 11:50:51 -04: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
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 05baadcd1d pdb: rename the "procedural_db" PDB group to just "pdb" 2019-08-06 12:51:56 +02:00
Sabri Ünal e93a20e7ac Issue #3112 - Missing mnemonics.
(cherry picked from commit 30e4a7ee5e)
2019-08-05 22:44:36 +02: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 3d049f565a Issue #360 - scripts that require brushes that GIMP no longer installs
carve-it.scm, chrome-it.scm: apply slightly modified patch from Carol
Spears which replaces hardcoding round brush names by creating a brush
on the fly and setting its radius.

Also fixed both scripts to not use deprecated color API which is
even completely gone from master.
2019-07-14 13:59:11 +02:00
Sabri Ünal cf892ba2f0 Issue #3220 - "How to Use Dialogs" does not open any page.
(cherry picked from commit 45784e9f50)
2019-04-24 23:32:57 +02:00
Jehan ed3bcf248e plug-ins: remove old spyrogimp.
Spyrogimp has been rewritten in Python with more features.

Note: this commit should not be backported to gimp-2-10 since we will
keep the old plug-in around (in case its API is used by older scripts in
particular). But let's turn over a new leaf with future GIMP 3 and only
keep the new plug-in.
2019-03-18 15:53:04 +01:00
Ell 8954d1f386 libgimpwidgets, app, plug-ins: use GimpSpinButton everywhere
Replace all direct uses of GtkSpinButton with GimpSpinButton, so
that its modified behavior extends to all our spin buttons.
2019-03-09 07:28:52 -05:00
Jehan e91028df2f plug-ins: clean the new Spyrogimp, rename it and remove old version...
... from menus.
The script-fu version is still available through pdb (for scripts) and
even in the action search. But in menus, only the new Python version
will be shown. Also update the description and name of the old version
to make clear it is deprecated in favor of the new plug-in.
Finally rename the new version to simply "plug-in-spyrogimp" (dropping
the "-plus" part as we should consider it as a replacement rather than
as another plug-in, which the "plus" would imply). Anyway the old one
was called "script-fu-spyrogimp", so there is no name clash.

While at it, do some trailing whitespace cleaning in the new plug-in.

(cherry picked from commit 8729f9a662)
2019-01-24 01:15:41 +01:00
Alexandre Prokoudine 85e6700aac Help menu: various updates
Commented out the inactive plug-ins registry: no point linking to a dead page.

Added links to the roadmap page, main wiki page, and the bug tracker. Placed
the link to the bug tracker one level up from '<Image>/Help/GIMP Online'
to make it more visible.
2018-11-14 09:17:21 +00:00
luz.paz ac282f2045 Misc. typos
Found via `codespell`
2018-10-19 15:30:27 +00:00
Ell 5e6e979a00 Issue #2339 - Error while executing script-fu-ripply-anim
In ripply-anim.scm, correct the edge-type argument passed to
plug-in-displace.
2018-10-09 19:31:23 -04:00
Ell 9a2999a553 plug-ins: in script-fu, don't query PDB procedures' info on startup
script-fu used to query the information of every PDB procedure on
startup, in order to get the number of parameters for each
procedure.  This was done so that nullary procedures were defined
in such a way as to accept (and ignore) any number of arguments
(and at least one of the scripts we ship relies on this behavior).
However, this requires expensive back-and-forth communication with
the main GIMP process, which notable slowed down script-fu's
startup, and had a non-negligible impact on GIMP's startup time.

Instead, avoid querying procedure information, and implement the
special behavior for nullary procedures at call time.  We do this
by defining, in addition to the "strict" gimp-proc-db-call
procedure, a "permissive" -gimp-proc-db-call internal procedure,
and using the latter to call the predefined PDB procedures.
2018-09-26 14:41:12 -04:00
Michael Natterer 5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
Michael Natterer 80997a8646 Remove most GTK_ADJUSTMENT() and (GtkAdjutment *) casts
they are obsolete in GTK+ 3.x because GtkAdjustment cannot be passed
around as GtkObject any longer, GtkObject is gone.
2018-06-24 18:15:16 +02:00
Ell 8e6a5298c1 plug-ins: increase input precision in guides-new-percent.scm
Increase the percision of the "position" property of
guides-new-percent.scm to two decimal places.  Currently, it only
accepts integers, which limits its accuracy to 100px.
2018-06-01 10:53:06 -04:00
Jehan 870ca6334d plug-ins: install plug-ins in subfolder.
I am going to forbid plug-ins from being installed directly in the root
of the plug-ins/ directory. They will have to be installed in a
subdirectory named the same as the entry point binary.
This may seem useless for our core plug-ins which are nearly all
self-contained in single binaries, but this is actually a necessary
restriction to eliminate totally the DLL hell issue on Windows. Moving
core plug-ins in subfolders is only a necessary consequence for it.
2018-05-20 21:06:35 +02:00
Simon Budig 7d64cf62c6 libgimpwidgets: rename the _grid()-Variants of gimp_scale_entry_*
Adjust all plugins to follow accordingly.

This concludes the GtkTable'ocide.
2018-05-20 21:06:35 +02:00
Michael Natterer 27ac4363b0 plug-ins: if GIMP_UNSTABLE, install test script-fu and pygimp scripts 2018-05-20 21:06:34 +02:00
Michael Natterer 046fcac2dd plug-ins: undeprecate script-fu-interface.c 2018-05-20 21:06:34 +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
Simon Budig fb5d463d78 script-fu: kill GtkTable 2018-05-20 21:06:33 +02:00
Michael Natterer 1b3135ca95 Get rid of using GtkMisc API globally 2018-05-20 21:06:30 +02:00
Thomas Manni 806d260601 script-fu: in weave, improve context and undo management
Use a gimp-context-push/pop at the beginning/end of the script
to keep the current context unchanged.

Add undo support for the whole procedure.
2018-05-16 21:44:30 +02:00
Thomas Manni d01bf70f86 script-fu: in slide, use an undo group when working on the initial image 2018-05-15 17:58:11 +02:00
Thomas Manni 316adffaae script-fu: in fuzzy-border, add undo support for the whole procedure 2018-05-15 17:36:27 +02:00
Thomas Manni 9c547e7d71 Bug 795958 - Effect (like "old photo") does not group undo information properly
When working on the current image, enclose the script actions in an undo group.

When working with a copy of the image, disable the undo stack of the new image
at the beginning of the script and reenable it at the end.
2018-05-15 11:40:08 +02:00