Commit Graph

1234 Commits

Author SHA1 Message Date
fb099cbf2a plug-ins: fix build failure on Windows due to incompatible mkdir call in script-fu
On Windows mkdir only accepts one parameter. Fix this by using g_mkdir
which takes care of platform specific details internally.
2021-08-09 18:11:30 -04:00
b2fa1bd948 script-fu: fix #6741 Round Corners script fails to work on layer masks
The round corners script was assuming that the drawable always
was a layer, which is incorrect when a layer mask is selected.

We fix this by always requesting the active layer instead of
active drawable.

We also enable this script for RGB and GRAY with alpha
channel. Although it might not always make sense to
use this script when an alpha channel is present, there
can be use cases where it is perfectly fine.

So let the designer decide if this script is suited or not
instead of GIMP making that judgement.

(cherry picked from commit ed35579861)

# Conflicts:
#	plug-ins/script-fu/scripts/round-corners.scm
2021-04-24 12:52:19 -04:00
c447c7e7b5 plug-ins: Add 'dir-make' procedure to Script-fu.
Closes: GNOME/gimp#541

Reviewer note: thanks to Stanislav Grinkov for cleaning up and reworking
a bit the patch, such as renaming the procedure to dir-make, as per
Kevin Cozens' review.

(cherry picked from commit 11906fa82c)
2021-04-24 15:23:48 +02:00
c52aa7dc2c plug-ins: change non-existing brush.
Fixes:
> Calling error for procedure 'gimp-brush-get-pixels':
> Brush 'Circle (03)' not found

The data/brushes/Circle-3.vbr brush doesn't exist since commit
7aa12175a4 in 2012 as far as I can see.

(cherry picked from commit 65e10faf50)
2021-04-21 17:53:43 +02:00
7b0df6f04a Fix issue #6577 : scriptfu hang on select dialog on Mac 2021-04-19 14:30:59 +00:00
08b396503f plug-ins: fix another cast warning.
Fix again these warnings:
> cast from pointer to integer of different size

(cherry picked from commit 2c6e21b1e7)

Note: the absence of this made script-fu crash on Windows 64-bit. See
issue #6664. Why this suddenly appeared and never happened before GIMP
2.10.24 is a big mystery.
2021-03-30 23:56:56 +02:00
d9b102e196 Misc typo fixes in plug-ins/
(cherry picked from commit c1585d609b)
2020-09-08 23:22:57 +00:00
0087167cb3 Misc. typos
Found via `codespell`

(cherry picked from commit ac282f2045)
2020-06-10 02:09:26 +02:00
f1d102bece 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.

(cherry picked from commit 05556457df)
2020-04-19 12:58:13 +02:00
75aac15343 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.

(cherry picked from commit c280cb9da7)
2020-04-19 12:55:31 +02:00
b78fcb5dc9 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

(cherry picked from commit e854de73ee)
2020-04-19 12:55:10 +02:00
808812b8f0 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

(cherry picked from commit 0a5af889f9)
2020-02-13 01:18:53 +02:00
1ce1b0eebe 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.
2019-10-24 15:13:35 +00:00
35df110a05 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 12:44:17 +00:00
Ell
7072c20bb9 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.

(cherry picked from commit 21649c5eaa)
2019-08-12 22:19:08 +03:00
30e4a7ee5e Issue #3112 - Missing mnemonics. 2019-08-05 20:06:50 +00:00
4bdb8792b5 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.

(cherry picked from commit 3d049f565a)
2019-07-14 14:01:56 +02:00
45784e9f50 Issue #3220 - "How to Use Dialogs" does not open any page. 2019-04-24 21:31:26 +00:00
Ell
2dad85b84f 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:43:13 -05:00
8729f9a662 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.
2019-01-24 01:05:02 +01:00
70a1534842 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-16 03:10:33 +03:00
Ell
15767a8896 Issue #2339 - Error while executing script-fu-ripply-anim
In ripply-anim.scm, correct the edge-type argument passed to
plug-in-displace.

(cherry picked from commit 5e6e979a00)
2018-10-09 19:31:27 -04:00
Ell
97a29b1e9e 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.

(cherry picked from commit 9a2999a553)
2018-09-26 14:41:29 -04:00
79961a6545 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.

(cherry picked from commit 870ca6334d)
2018-08-16 13:25:51 +02:00
a88c0ffb93 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:47:19 +02:00
Ell
b6ecaad275 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.

(cherry picked from commit 8e6a5298c1)
2018-06-01 10:53:51 -04:00
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
d01bf70f86 script-fu: in slide, use an undo group when working on the initial image 2018-05-15 17:58:11 +02:00
316adffaae script-fu: in fuzzy-border, add undo support for the whole procedure 2018-05-15 17:36:27 +02:00
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
69b2e84924 Source and trivial typos
Found via `codespell` and `grep`
2018-05-12 23:44:47 +02:00
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
1811d8ebf9 script-fu: fix a typo in the Add Border script 2018-04-30 18:10:08 +03:00
f35c2cdcec script-fu: port chrome-it.scm to non-deprecated color API 2018-04-26 15:45:04 +02:00
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
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
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
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
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
9724d7989d Mark legacy plug-ins/scripts as such in menu 2017-12-27 02:40:27 +03:00
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
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
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
f2306abc0a Bug 761170: Warnings building with clang
Fix some of the warnings.
2017-07-15 21:05:56 +02:00
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
6918b4b773 plug-ins: set the GimpColorConfig on all script-fu color buttons 2017-05-28 16:43:00 +02:00
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
5e666113b1 plug-ins: replace deprecated enum values in script-fu scripts 2017-02-26 21:30:11 +01:00