Commit Graph

53366 Commits

Author SHA1 Message Date
b4a67b661f ScriptFu: move init scripts to separate directory /scripts/scriptfu-init
When mingled with plugin scripts, they needed a non-standard suffix .init.
Which makes an editor not recognize them.
Which deviates from Scheme convention for the main init script: init.scm.

The separate directory is also a place for script authors
to put Scheme scripts they don't want loaded automatically,
but when a script calls Scheme load function.

No change to observable behavior in the app or ScriptFu tools.
2024-10-25 13:56:36 +00:00
ffa972f9a8 ScriptFu: libscriptfu: symbol for script-fu-sys-install-directory
and user-install.

Symbols not used yet.

Also improve function ts_load_init_and_compatibility_scripts,
so reader can understand what it does.
2024-10-25 13:56:36 +00:00
da84d3361d ScriptFu: libscriptfu: extract method that loads init and compat scripts
No functional change intended.

In preparation for loading from different dir, and different suffixes.
2024-10-25 13:56:36 +00:00
0e570f8db1 ScriptFu: libscriptfu: extract method ts_define_constant_string
No functional changes intended.

In preparation for defining another string constant.

Makes code more readable.
2024-10-25 13:56:36 +00:00
861f88ccf1 Updated greek translation 2024-10-24 21:11:02 +03:00
598fb4834b Updated Greek translation 2024-10-23 21:06:20 +03:00
c8740e8ab6 ScriptFu: obsolete the defined symbols abbreviating gimp paths
E.G. gimp-dir

Deprecated previously, obsolete for major version 3.0
2024-10-22 15:18:50 -04:00
fd7b029471 ScriptFu: tests: add test: scripts non-interactive call other script plugins
This is rarely done.
Most script plugins call PDB functions that are GIMP INTERNAL (gimp-foo)
or filter plugins that wrap Gegl filters (plug-in-foo).
But a Scheme script plugin can call other script plugins (script-fu-foo).

When a script does call another script,
it can be within the interpreter (purely in Scheme),
or to an interpreter in another process (via the PDB, with binding.)

It can get complicated using the optional v3 binding of return values.

This tests and illustrates different cases.
2024-10-22 15:18:50 -04:00
0c5a716fe8 ScriptFu: scripts: fix scripts that used now obsolete functions from the SIOD dialect
Mostly one word substitutions.

A few function definitions were moved to the scope of
a single script that used them.
Those functions won't be available to third party scripts
except now by cut and paste.

For major release 3.0.
2024-10-22 15:18:50 -04:00
e4372897fa ScriptFu: revert removal of certain compatibility definitions for SIOD
When the function is not trivially substituted with  a call to a Scheme R5RS function.
In other words, compatibility definitions that are not just an alias from SIOD to R5RS
Scheme dialects.

The prior removal was based on comments in the code,
saying the functions could easily be removed.
It turns out the functions are used in the repo, and not easily replaced.

Third party scripts may suffer the same dilemma:
use SIOD functions that are not trivially replaced.
This commit only fixes the dilemma for the scripts in the GIMP repo.

Reverted and kept:
  *pi* symbol for math constant
  cons-array an obscure function of unknown origin
  butlast a function in some Scheme dialects but apparently not in R5RS

These MIGHT be removed in the future, with more work.
2024-10-22 15:18:50 -04:00
55c0774e39 ScriptFu: remove ScriptFu's aliasing of deprecated PDB procedures
Leaves the mechanism in place, but erases all rows of the alias map data.

Update devel-doc to say ScriptFu has its own mechanism for aliasing.

For major release 3.0
2024-10-22 15:18:50 -04:00
38220ec9eb ScriptFu: obsolete compatibility scripts for SIOD dialect and older PDB
For major release 3.0

SIOD dialect was used before GIMP 2.4 circa 2006.

Two deprecated PDB adaptors removed, one dealing with multi-layer select.
2024-10-22 15:18:50 -04:00
563e9c7220 PDB: obsolete aliased deprecated PDB procedures
For major release.  Breaking  API for PDB.
2024-10-22 15:18:50 -04:00
07ac91e5a1 devel-docs: add doc about deprecated and wrapped PDB procedures 2024-10-22 15:18:50 -04:00
bced3c5e04 libgimpwidgets: GimpUnitComboBox and GimpZoomModel...
...are now FINAL TYPEs.
2024-10-22 04:23:46 +00:00
37d94f3fd6 app/display: Copy filters when layers are dropped on tabs
Resolves issue #12203.
Similar to d87c728f, dragging a layer over to a new image via
the tabs uses gimp_image_new_from_drawable () and only
copies a single layer. This patch adds the filter copy code
here as well.
2024-10-21 22:09:48 +00:00
1a70e911b1 libgimpwidgets: Add parent instance to GimpPathEditor
The GtkBox parent_instance was left off when the widget
was converted to FINAL TYPE in bd23d5a9.
2024-10-21 13:40:59 +00:00
542d2af2a5 pdb, libgimp: Add API to get/set Emulate Brush Dynamics
This patch adds a pdb getter/setter for GimpStrokeOptions'
emulate-brush-dynamics property. This allows users to change
the "Direction" of strokes via Script-fu/Python API calls.
2024-10-21 10:55:27 +00:00
d87c728f0d core: Copy filters for new single-layer images
Resolves #12198.
When dragging a layer to the toolbox to create a new
image, we weren't copying over the filters. This is because
that action still uses gimp_image_new_from_drawable ()
rather than the multi-layer capable gimp_image_new_from_drawables ()
function.
For now, we'll fix the immediate problem by implementing the filter
copy code in this function. Long term, we should port that code to
use gimp_image_new_from_drawables () instead.
2024-10-20 19:04:16 +00:00
b05c32e6ea Update German translation 2024-10-20 18:28:02 +00:00
7c7831a3dd Update German translation 2024-10-20 18:26:59 +00:00
344be9337a plug-ins: Make Legacy Grid colors independent of layer's transparency
Per Anders Jonsson, the grid colors can have semi-transparency even
if the image itself has no alpha channel. This patch always sets the
GeglColor's babl format to contain an Alpha channel, rather than reusing
the image's color format. The index used for alpha is also updated to
adjust to the number of channels, since GimpRGB previously always used
index 3 for both RGB and Grayscale images.
2024-10-20 12:11:30 +00:00
5a3d7f1005 ScriptFu: tests: enhance test of gegl wrappers
Call them on different modes of image
and different sizes of image.

Motivated by faults discovered in denoise filter for small images.

No faults detected by new tests.

ScriptFu: tests: enhance testing of gegl wrapper plugins

Add tests on other image modes.

Add tests on small images.
2024-10-19 14:37:39 -04:00
bd23d5a926 libgimpwidgets: More widgets are now FINAL types 2024-10-19 02:27:07 +00:00
0b72b028e8 ScriptFu: fix #12157 old-style dialog slider default 0 instead of declared value
This seems like a hack.
A better fix might be in the gimp_scale_entry widget.
2024-10-18 15:33:44 -04:00
6a0844b59a ScriptFu: fix #12188 new-style dialog lacks slider widget
Creates a "custom" widget, slider w spinner,
since otherwise defaults to entry w spinner.
2024-10-18 14:35:17 -04:00
f1372acbdc ScriptFu: tests: restore to working condition
No changes except to tests.

After changes to API:
Colormap=>Palette
Vectors=>Path

After changes to ScriptFu handling of color.

Misc upgrade of tests to use-v3 binding
2024-10-18 08:25:42 -04:00
d2d4d65acb libgimpwidgets: GimpIntRadioFrame is now a FINAL type 2024-10-18 04:17:23 +00:00
39480776ed Update Georgian translation 2024-10-18 04:15:57 +00:00
9db757690d Update Georgian translation 2024-10-18 04:14:33 +00:00
2cf77b1565 Update Georgian translation 2024-10-18 04:12:54 +00:00
b06b7e47c1 NEWS: update. 2024-10-17 22:51:11 +02:00
65460fc240 libgimpthumb: GimpThumbnail made into a final class. 2024-10-17 22:38:25 +02:00
f965b659eb libgimpconfig: gimp_config_(de)serialize_strv() should not be public.
These 2 functions are only used in one file each, there are absolutely
zero reasons to make them public. These functions have nothing special.
2024-10-17 22:38:25 +02:00
32034901d2 libgimpconfig: GimpColorConfig is now final. 2024-10-17 22:38:25 +02:00
33efebae79 libgimpcolor: GimpColorTransform made final. 2024-10-17 22:38:25 +02:00
6f84a76e7a ScriptFu: fix #10978 handling of color
Revise handling of GeglColor, formerly GimpRGB.

Marshall to/from Scheme lists of numeric.
Marshall from string CSS names and notations.

Conversion to/from GRAY, GRAYA, RGB, RGBA.

See color.scm test script.
2024-10-17 18:45:51 +00:00
e92212d02a ScriptFu: add tests of Color 2024-10-17 18:45:51 +00:00
863bc2b3ed ScriptFu: new doc programmers ref for Color in ScriptFu 2024-10-17 18:45:51 +00:00
732adc1f23 libgimpbase: moving GIMP_TYPE_PARAM_CHOICE and GIMP_TYPE_PARAM_EXPORT_OPTIONS…
… in gimpchoice.[ch] and gimpexportoptions.[ch] respectively.

The overlong gimpparamspecs.[ch] makes it harder to read IMO.
2024-10-17 19:41:39 +02:00
47470880b2 app, libgimpbase: gimp_signal_private()'s header is now made private.
As other functions, it is still exported, but let make its header not
exposed in public API.
2024-10-17 17:12:30 +02:00
ac1bf4a64e app, libgimpbase: also move gimp_cpu_accel_set_use() in a private header.
Similar to previous commit. If we don't want people to use this function
yet need to export it, at least don't expose the declaration in shipped
headers and even less in the API docs.
2024-10-17 16:12:04 +02:00
f6edf596bf app, libgimp: move gimp_env_init() to a non-shipped header.
Since we consider it private, yet it's still needed in libgimp and app,
let's at least put it in a private header because there is no need for
people to try it out.

I'm also editing a bit the annotations for gimp_main() and GIMP_MAIN().
2024-10-17 16:11:15 +02:00
8ff2682a3c libgimpcolor: the GimpRGB API is dead already. Just remnant files of it. 2024-10-16 22:44:59 +02:00
cd71f9ff00 libgimpwidgets: GimpFileEntry now final. 2024-10-16 22:30:49 +02:00
4a02c08bfa libgimpwidgets: GimpEnumStore made final. 2024-10-16 22:30:49 +02:00
9ff663ccb2 libgimpwidgets: GimpColorSelector and GimpController are abstract. 2024-10-16 22:30:49 +02:00
8822ca71a2 libgimpwidgets: GimpColorSelection made final. 2024-10-16 22:30:49 +02:00
95b1963723 libgimpwidgets: GimpColorNotebook made final. 2024-10-16 22:30:49 +02:00
426caf7132 libgimpwidgets: GimpColorHexEntry made final. 2024-10-16 22:30:49 +02:00