Commit Graph

1320 Commits

Author SHA1 Message Date
Lloyd Konneker 5cb51e096a Fix issue #6577 : scriptfu hang on select dialog on Mac
(cherry picked from commit 7b0df6f04a)
2021-04-19 16:31:33 +02:00
luz paz 6457394069 Issue #6446: Typo fixes. 2021-02-24 12:33:03 +01:00
Niels De Graef dffab0e9a4 Remove GimpInt16Array
It isn't being used by any plug-in or any code in GIMP at all even.
Let's get rid of it while we can still break API, so we can cut down on
all the complexity of the gimp-param stuff a bit.
2021-02-18 11:32:45 +00:00
Jehan d95f417719 app, libgimpwidgets, modules, plug-ins: code changes after GimpScaleEntry…
… reclassing as GimpLabelSpin subclass.
2020-11-05 18:06:52 +01:00
Jehan b3c0ba061b app, libgimpwidgets, modules, plug-ins: finishing GimpScaleEntry port.
Renaming the temporary function gimp_scale_entry_new2() into
gimp_scale_entry_new() now that the original code is entirely gone. This
is now a fully-fledged widget with a nice and proper introspectable API.
2020-11-01 02:46:20 +01:00
Jehan 611e22fd81 plug-ins: port script-fu-interface to GimpScaleEntry. 2020-10-31 02:24:28 +01:00
Jehan b00bb346a9 plug-ins: more complete naming for Python|Script-Fu consoles.
Just "Console" is enough in the context of menus with submenu hierarchy,
but when accessing directly the feature (with Action Search for
instance), a more accurate name is nicer. It avoids to have to check
what is what in the tooltip text.
2020-05-26 14:32:11 +02:00
Niels De Graef ae34e778fc meson: Use libgimp(ui)_dep in plug-ins meson files
This gives a big cleanup in the meson.build files of the plug-ins.

It's also quite a bit more maintainable, since anything that changes in
libgimp's dependencies, linkage, ... doesn't have to be copy-pasted into
each plug-in.
2020-05-11 07:01:37 +02:00
Jehan c280cb9da7 plug-ins: fix various other warnings on the Windows build CI.
1 > warning: "_WIN32_WINNT" redefined
2 > pointer targets in passing argument 2 of 'send' differ in signedness
3 > passing argument 4 of 'setsockopt' from incompatible pointer type

For the signedness/type issues, I just casted to (void *) which was the
expected type for these parameter on the Linux API anyway. As for
Windows API (which was expecting char* for these various API), the
compiler just does the cast itself from void* without complaining
anymore.
2020-04-17 14:42:25 +02:00
Jehan e854de73ee plug-ins: fix signedness warning with different expectation Win/Linux.
On Windows, accept() wants an int for addrlen but on Linux, it wants a
socklen_t which is an unsigned int. So we can't just switch to gint as
proposed in !232 (if we do so, the signedness warning now happens on the
Linux build instead of the Windows one).

Fortunately it looks like socklen_t is actually typedef-ed to int in
Windows headers. So let's just use this type, which is much more proper
anyway as this variable is only used in functions which want this type
on Linux.

Fixes:

> warning: pointer targets in passing argument 3 of 'accept' differ in signedness
2020-04-17 14:18:53 +02:00
Jehan 05556457df plug-ins: remove last usage of GTimeVal and g_get_current_time().
Deprecated as not year-2038-safe, this was the last remnant of code
which was still using it.
2020-04-14 16:08:38 +02:00
Nikc M 0a5af889f9 Issue #175 - Allow the erase every other row plugin to skip a different number of rows
Adds generalized erase Nth row function,
and sets original erase row function to
call generalized one with n = 2
to reduce code duplication
2020-02-13 01:18:22 +02:00
Sabri Ünal 4d8a61af34 CID 225792 Resource leak in script-fu-server.c
Variable ai and ai_curr going out of scope at line 496.
Variable ai going out of scope at line 545.

Revealed by Coverity Scan.

(cherry picked from commit 1ce1b0eebe)
2019-10-24 18:05:58 +02:00
Jehan 2c6e21b1e7 plug-ins: fix another cast warning.
Fix again these warnings:
> cast from pointer to integer of different size
2019-09-23 10:50:33 +02:00
luzpaz 44d10e458c Fix various typos
Found via `codespell` (v1.17.0.dev0)
2019-09-21 17:10:46 +00:00
Michael Natterer df8d5b02ae libgimp, plug-ins: remove the "preview" parameter from gimp_ui_init()
It's dead since a looong time.
2019-09-20 19:56:00 +02:00
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
luz.paz 69b2e84924 Source and trivial typos
Found via `codespell` and `grep`
2018-05-12 23:44:47 +02:00
Michael Natterer 62279047b1 Bug 795763 - Update gimp.org links to https://
Update links to https:// in "About". the "Help" menu, and several
user-visible error messages.
2018-05-03 00:27:29 +02:00
Alexandre Prokoudine 1811d8ebf9 script-fu: fix a typo in the Add Border script 2018-04-30 18:10:08 +03:00
Michael Natterer f35c2cdcec script-fu: port chrome-it.scm to non-deprecated color API 2018-04-26 15:45:04 +02:00
luz.paz 4a77ff2d3d Bug 795557 - Misc. typo fixes in source, comments and doxygen (pt3)
Found via `codespell` and grep.
2018-04-25 23:49:06 +02:00
Michael Natterer b80036e14f pdb: deprecated gimp-layer-translate
and port all plug-ins/scripts to gimp-item-transform-translate.
2018-04-23 15:49:23 +02:00
luz.paz 147c09f19e Bug 795161 - Misc. typo fixes in source comments and doxygen
Found via `codespell`
Follow-up to  commit 7fdb963e01
2018-04-18 21:06:57 +02:00
Michael Natterer 233ac80de1 script-fu: port all scripts to the new gimp-drawable-edit functions 2018-04-16 20:12:12 +02:00
Ell 6ebc3f1b09 Makefiles: don't use -xobjective-c when linking files on Mac
Last commit caused -xobjective-c to be passed during linking on
Mac, causing object files to be treated as source files.  Add a
-xnone flag to AM_LDFLAGS, canceling the effect of -xobjective-c.

Additinally, add a -xobjective-c++ flag to AM_CXXFLAGS, so that we
can use Objective-C in C++ files on Mac, if we ever need to.
2018-04-08 04:03:55 -04:00
Ell 06950be7f0 Makefiles: don't use -xobjective-c when compiling C++ files on Mac
On Mac, pass -xobjective-c to the compiler through AM_CFLAGS, not
AM_CPPFLAGS, so that it's only used for C sources, and not C++
sources.  In the latter case, it clashes with the -std=... flag,
spewing an error.  Thanks, Partha :)
2018-04-07 16:57:52 -04:00
Alexis Wilhelm a51efd09d1 Bug 663576 - make -C plug-ins/script-fu check-for-deprecated-procedures-in-script-fu...
...lists files that do not use deprecated functions

Better regex that matches the right stuff.
2018-01-01 14:25:03 +01:00
Alexandre Prokoudine 9724d7989d Mark legacy plug-ins/scripts as such in menu 2017-12-27 02:40:27 +03:00
Massimo Valentini 696b55b4f0 Bug 783382: Lava filter looks different than in 2.8
s/LAYER-MODE-NORMAL/LAYER-MODE-NORMAL-LEGACY/ almost makes it
look like before.
2017-12-12 12:32:29 +01:00
Michael Natterer e6c1c14a94 pdb, libgimp: change the gimp-drawable-invert API again
Remove the invert-linear and invert-non-linear variants and simply add
"gboolean linear" to gimp-drawable-invert. This should actually be an
enum but I didn't find a good name right now...
2017-09-03 21:28:47 +02:00
Michael Natterer 2e6c39ed9c pdb, libgimp: rename gimp_drawable_invert() to _invert_non_linear()
and add gimp_drawable_invert_linear(). Also, finally deprecate
gimp_invert() and port all its uses in plug-ins and scripts to
gimp_drawable_invert_non_linear() so the result is the same.
2017-08-30 12:27:17 +02:00
Massimo Valentini f2306abc0a Bug 761170: Warnings building with clang
Fix some of the warnings.
2017-07-15 21:05:56 +02:00
Simen Heggestøyl 8412192f85 Bug 783386 - Circuit filter broken
Fix an error in the circuit filter introduced in
1ce7fc6c77.

It's gimp-drawable-desaturate not gimp-desaturate-drawable.
2017-06-04 00:09:41 +02:00
Michael Natterer 6918b4b773 plug-ins: set the GimpColorConfig on all script-fu color buttons 2017-05-28 16:43:00 +02:00
Michael Natterer dda54c1df8 Deprecate stock items for good and change all icon defines to GIMP_ICON_*
Try to sort all GIMP_ICON_* defines into FDO categories like in
https://specifications.freedesktop.org/icon-naming-spec/latest/ar01s04.html

Add defines for all icons we override, rename some icons to their FDO
standard names, and mark the ones we duplicate with a comment so we
don't forget to rename those to standard names in 3.0.
2017-03-05 16:01:59 +01:00
Michael Natterer 5e666113b1 plug-ins: replace deprecated enum values in script-fu scripts 2017-02-26 21:30:11 +01:00
Michael Natterer 801bd8fb3f plug-ins: get rid of icons in dialog buttons (use labels not stock IDs) 2017-02-12 16:18:54 +01:00
Michael Natterer 67275dd1ff script-fu: replace deprecated constants by their new names 2017-01-09 20:38:19 +01:00
Michael Natterer 0a0acc9f2a plug-ins: remove the hardcoded compat enums from script-fu and pygimp
Instead, simply look them up via the type system, and register their
values like they were normal enums.
2017-01-09 16:00:10 +01:00
Michael Natterer 178794f6f1 libgimpbase: rename enum GimpHueRange's values
and add compat cruft for the old names.
2017-01-09 02:45:16 +01:00
Michael Natterer 152adbb1bd Rename GIMP_LAYER_MODE_FOO_BROKEN to GIMP_LAYER_MODE_FOO_LEGACY
"Broken" sounds like it needs fixing, but it's legacy compat stuff
that will have to stay for all eternity.
2017-01-09 01:27:20 +01:00
Michael Natterer 66060e3307 app, libgimp*, plug-ins: replace enum GimpLayerModeEffects by GimpLayerMode
with proper value names. Mark most values as _BROKEN because they use
weird alpha compositing that has to die. Move GimpLayerModeEffects to
libgimpbase, deprecate it, and set it as compat enum for GimpLayerMode.
Add the GimpLayerModeEffects values as compat constants to script-fu
and pygimp.
2017-01-08 23:00:19 +01:00
Jehan 3bab69310e plug-ins: variable alignement.
Extreme nitpicking on commit 6e608f6, I'm sorry!
I just couldn't let go this very slightly misaligned variable.
2017-01-01 19:16:32 +01:00
Cameron Gregory 6e608f6aae Bug 626494 - Enhancement to script-fu-server logging to output milliseconds taken 2016-12-24 23:42:48 +01:00
Michael Natterer 754b9a849c script-fu: port two scripts to gimp-edit-paste-as-new-image 2016-09-20 20:23:04 +02:00
Michael Natterer 4df9a1d568 Get rid of gtk_misc_set_alignment(label) and use gtk_label_set_x,yalign() 2016-09-08 19:11:20 +02:00
Richard Kreckel dd9b0fc55b Bug 768044 - Fix many typos
This fixes many typos in comments and one in a user-visible string (msgid
"center abscisse" changed to "center abscissa" in affected po files. too).
2016-06-26 00:35:24 +02:00
Kevin Cozens 3ef6033276 Make various limits configurable (from TinyScheme SVN r109) 2016-06-02 15:32:04 -04:00
Kevin Cozens 7297ace6bf Added "tinyscheme" to the features list. From SVN version 106 of offical version of TinyScheme. 2016-06-02 15:32:03 -04:00
Kevin Cozens 4b55c551f3 Removed redundant 'break;' statement. Based on SVN version 105 of offical version of TinyScheme. 2016-06-02 15:32:00 -04:00