Commit Graph

53407 Commits

Author SHA1 Message Date
596ce11b5c libgimp, plug-ins: following up the renaming of GIMP_PDB_PROC_TYPE_EXTENSION…
… to GIMP_PDB_PROC_TYPE_PERSISTENT, let's rename some procedures.

s/gimp_plug_in_extension_enable/gimp_plug_in_persistent_enable/
s/gimp_plug_in_extension_process/gimp_plug_in_persistent_process/
s/gimp_procedure_extension_ready/gimp_procedure_persistent_ready/
2024-09-29 18:43:49 +02:00
a9bc4c6c1b gimp-ux#93: GIMP_PDB_PROC_TYPE_EXTENSION renamed GIMP_PDB_PROC_TYPE_PERSISTENT.
Even though it's not public yet (and won't really be for GIMP 3.0), I
created a new concept of "GIMP Extension" (.gex files) which bundles
various types of data for GIMP, such as plug-ins but also brushes and
other resources, themes, icons, etc.

Having 2 different concepts named the same is confusing, especially
since one of them is not really self-explaining IMO (why are "always-ON"
plug-ins called "extensions"?). So even though this is the older
concept, and since we are anyway massively breaking the API for GIMP
3.0, let's rename this older concept. "Persistent Plug-Ins" is much more
self-defining.
2024-09-29 18:08:40 +02:00
4a41b76411 build/linux: Update ghostscript, json-c and graphviz modules
Ported from: e499861f14
2024-09-29 12:58:47 -03:00
7cd99865a1 Update Chinese (Taiwan) translation 2024-09-29 15:14:19 +00:00
6c98bfdc8a script-fu: mark label for translation 2024-09-29 14:34:47 +00:00
45b16f5215 Update Chinese (Taiwan) translation 2024-09-29 14:18:20 +00:00
8b2120dac3 Update German translation 2024-09-29 13:07:45 +00:00
1cfe27e73e app/widgets: Fix Fade visibility in Paint Dynamics Output Editor
The Fade curve is meant to use the widget's foreground color. The current
code detects this by checking if the curve's predefined color has an alpha
value of 0 - if it does, INPUT_COLOR (i) returns NULL and sends a NULL color
variable to gimp_curve_view_set_curve ().

However, since the GeglColor port, the "color" variable is an empty
GeglColor object rather than a pure NULL value. Thus, the line was always
drawn with the default GeglColor value which is difficult to see in light mode.

This patch adds a tertiary conditional statement so that a pure NULL is sent if
the alpha value is 0, rather than the color variable.
2024-09-29 11:22:26 +00:00
c57c2dbbed NEWS: update. 2024-09-29 12:59:58 +02:00
3f3c576399 libgimp: make GimpZoomPreview a final type. 2024-09-29 12:27:50 +02:00
84b4f48432 libgimp: fix .def file indentation. 2024-09-29 12:27:50 +02:00
5b981adc7f libgimp: make gimp_resource_select_*() API private. 2024-09-29 12:27:50 +02:00
81fcb71209 libgimp: set 2 functions to GimpResourceChooser as private. 2024-09-29 12:27:50 +02:00
eb07b7f8f8 libgimp: GimpProcBrowserDialog is a final type. 2024-09-29 12:27:50 +02:00
16cfc9d681 libgimp: mark various private functions as G_GNUC_INTERNAL.
It may be more efficient this way on supported compilers.

Some of the private functions cannot be marked with this macro because
they are used across GIMP libraries (for instance some libgimp
functions are used in libgimpui, but are not meant to be public), while
they are not made public in headers. These are still considered private,
as far as API stability is concerned.
2024-09-29 12:27:50 +02:00
12ad579843 libgimp: fix disabling various metadata export per Preferences.
Preferences > Image Import and Export tab has various Export Policies,
which are mostly for safety reasons. One may want to default at never
exporting specific metadata. This got broken and anyway the logic was
not good enough.

Now these policies are followed in interactive mode, unless an export
has already happened for this specific export plug-in on this specific
file (in this case, we reuse the last values). We don't want settings to
unexpectedly change in such a case.

In last-vals and non-interactive run-mode though, we don't follow the
Preferences policies, since in the former case, we want to reuse exactly
the same settings (e.g. we don't want an Export discarding metadata
which explicitly checked in the Export As) and in the latter case, it is
the developer's responsibility to set up expected options.
2024-09-29 12:27:50 +02:00
68ee943200 libgimp: clean up the GimpImage's metadata API.
gimp_image_metadata_load_prepare(), gimp_image_metadata_load_finish()
and gimp_image_metadata_save_finish() are only ever used internally now,
so there is no need to expose them.

If we realize that we need them as public functions later, or someone
reports a valid use case, we can always bring them back later.

Also improves a bit various annotations.
2024-09-29 12:27:50 +02:00
aa2527843b libgimp: use G_DECLARE_FINAL_TYPE() for GimpImageComboBox. 2024-09-29 12:27:50 +02:00
9e0a75cd87 libgimp: improves docs and annotations for GimpImage's color profile API. 2024-09-29 12:27:50 +02:00
993fae97df libgimp: make GimpDrawablePreview a final type. 2024-09-29 12:27:50 +02:00
3051796f3e app, libgimp, pdb, plug-ins: merge gimp_channel_new() in libgimp and PDB.
Why have 2 functions if one is basically just redirecting to the other.
All we needed to do was to reorder the PDB args.
2024-09-29 12:27:49 +02:00
bd287d6f89 libgimp, plug-ins: variosu gimp_*_chooser_new() should use specific type…
… for default value.

Don't use the generic GimpResource which implies that we could set any
GimpResource (which of course makes no sense).
2024-09-29 12:27:49 +02:00
d49077569d libgimp: GimpAspectPreview can be declared as a final type. 2024-09-29 12:27:49 +02:00
9f17074ba6 Update Norwegian Nynorsk translation 2024-09-28 16:18:18 +00:00
a3ed688334 Update Norwegian Nynorsk translation 2024-09-28 15:47:52 +00:00
10bccee8b0 ScriptFu: test TinyScheme numerics
No changes except to tests.

Many tests of TinyScheme compliance to R5RS re numbers.

Tests issue 1049 "prints floats with commas" in non-English locale.
Some tests pass in English but fail in German.
Prepatory to a fix, so we know the fix works and doesn't break anything else.
2024-09-28 14:54:30 +00:00
ee9bb99801 app/widgets, themes: Show Sample Point indexes in Default theme
The Default box.vertical style covers up
the Sample Point indexes that are drawn
with Cairo. This patch adds a style for the
GimpSamplePointEditor that sets its inner
box.vertical to transparent in order to
to make the indexes visible.
2024-09-28 13:42:08 +00:00
7d53fdad9d Update German translation 2024-09-28 12:06:54 +00:00
cf2893747d gitlab-ci, build: Do not bundle nor dist any Lua related files
Following 78665ca372

Since our official builds tends to be vanilla (only using meson
standard options), there is no need to shipping these lua files.

This commit can be reverted in the future if Lua is stable again.
2024-09-28 01:42:44 +00:00
acebb4fa22 themes: Define symbolic icon colors for System theme
Symbolic layer tree icons are often invisible
when not selected on System themes in
light mode. This patch adds a CSS rule
to ensure the layer tree icons are visible
on light backgrounds.
2024-09-27 21:10:40 +00:00
771dd219f6 ScriptFu: rename script-fu-register-regular => -procedure
As suggested by reviewers, use a better word.
Regular denotes size.
Procedure is the same word used in the classes in the code.
Procedure denotes a general procedure, without specialization.

Renames only where visible externally by script authors.
Internally, some functions are still named "_regular".
That can be changed later as a style issue.
2024-09-27 14:35:50 +00:00
a5e191e209 ScriptFu: documents: edit the "author guide" re new registration functions 2024-09-27 14:35:50 +00:00
96e02122b8 ScriptFu: plugins: port to script-fu-register-regular
Ported all supported/shipped Scheme plugins in the repo
that formerly called script-fu-register.
No test plugins were ported.

The plugins now use the new dialog, GimpProcedureDialog.

These are the plugins that are not filters i.e. not GimpImageProcedure,
which were ported earlier to script-fu-register-filter.

The test plugin Demo>Sphere demonstrates that while script-fu-register
is now deprecated, it still works, showing the old dialog.

Misc bug fix to prior commits.

Misc porting of same plugins to v3 binding of PDB return values.

Misc fixes: invalid default font names, and deprecated PDB calls.
2024-09-27 14:35:50 +00:00
d0a6c4c758 ScriptFu: add Scheme language function script-fu-register-regular
Building on prior commits, with a few small fixes to them.

First demonstrable changes towards #12605.

Font map plugin is ported as a test case.

Old-style plugins using script-fu-register still work.
2024-09-27 14:35:50 +00:00
d361256977 ScriptFu: add methods for running regular procs
A chain of methods starting with the run_fun script_fu_run_regular_procedure.
To use GimpProcedureDialog for scripts that are not ImageProcedure.
2024-09-27 14:35:50 +00:00
a96211fcb7 ScriptFu: refactor script-fu-command
No functional changes.

    Extract methods to be in common with script_fu_fu_regular_proc
    i.e. to run a GimpProcedure instead of GimpImageProcedure
2024-09-27 14:35:50 +00:00
0a2b64352c ScriptFu: refactor script-fu-dialog
No functional changes.

Extract methods to be in common with script_fu_fu_regular_proc
i.e. to run a GimpProcedure instead of GimpImageProcedure
2024-09-27 14:35:50 +00:00
16efc8adc2 Update Chinese (Taiwan) translation 2024-09-27 14:18:31 +00:00
46c94cd1c5 Update Chinese (Taiwan) translation
(cherry picked from commit f713ac680f79001c48ebf8a03b6207e32a755d90)
2024-09-27 14:14:01 +00:00
4ffc99b75d ScriptFu: fix 8463 obsolete SF-VALUE
Any third-party scripts using SF-VALUE will need porting.
2024-09-27 06:41:29 -04:00
98b2216244 tools: fix another deprecation warning, this time in PyGObject.
Fixes:

> PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated.
> Please specify keyword(s) for "label" or use a class specific constructor.
> See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
2024-09-26 20:10:47 +02:00
1726a6f89f tools: fix deprecated syntax.
This fixes a similar deprecation warning on various pieces of code:

> DeprecationWarning: Testing an element's truth value will always return True in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
>   samples = log.find ("samples") or empty_element
2024-09-26 19:49:47 +02:00
05c86dad8a app: disallow GEGL graph as layer effect, except with an environment variable.
GEGL graph is a free-form effect which can just run any other effect. It
is very useful for GEGL operation developers, but it's dangerous because
it allows running any of the operations, even the ones which cannot be
run through a GUI in GIMP, or the ones otherwise forbidden as layer
effects. In particular, you could run some of the sink effects to
overwrite local files, even with a vanilla GIMP.

So by default, we forbid the GEGL Graph tool to be used as a
non-destructive effect, and we discard any gegl:gegl layer effect found
in a XCF. Yet we leave a way for developers to create and load a GEGL
Graph effect through an environment variable which can be discovered
through appropriate warnings (on XCF load) and tooltip (in GEGL Graph
dialog).
2024-09-26 15:16:51 +02:00
6e88ac559e app: forbid GeglOperationSink as layer effects on XCF load.
As suggested by pippin, it would at least prevent loading XCF which
would override local files using default GEGL operations. Normally these
ops which writes to file cannot be created through the GUI, but a XCF
using one such op could easily be constructed.

Of course, this doesn't block third-party ops doing similar things
without being sink operation subclasses.
2024-09-26 14:08:28 +02:00
9ee369690b libgimpbase: handle cases when fgets() may fail.
Fix:

> warning: ignoring return value of ‘fgets’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
2024-09-26 10:51:31 +02:00
9e4ff0f62f app: oups, using the string after freeing it! 2024-09-25 22:09:34 +02:00
2633291a55 app: don't try to convert mask when only the TRC changed.
E.g. changing from non-linear to linear without bit-depth change would
trigger a CRITICAL on mask conversion, because masks are always linear
anyway. Only the bit-depth change should trigger a conversion.
2024-09-25 22:03:05 +02:00
4803c62201 app: make some radio actions not sensitive when selected.
Rather than showing actions as active when they'll just be no-op, make
these inactive.

There are more to fix this way, but these 2 had been really annoying me
for some time because they are very often run.
2024-09-25 21:29:53 +02:00
f3cd852da8 app: return without doing anything when toggling the already active action. 2024-09-25 20:59:00 +02:00
a38d3d3028 libgimp: fix some copy-paste bug.
Thanks to Alx for spotting this one!
2024-09-25 12:06:44 +02:00