Commit Graph

52933 Commits

Author SHA1 Message Date
Idriss Fekir 73557d011b text: keep fonts usable if the current one becomes missing
If a font is being used and becomes missing all other fonts become
unusable, setting the fontconfig object to the pango fontmap
fixes this.
2024-08-04 11:02:09 +01:00
Idriss Fekir fe32265b61 GimpText: Fix saving to xcf with text in an alias font
Alias fonts don't have a generated name, their alias name is used
instead. But the serialization code assumed that all fonts had a
generated name of the format "gimpfont%d" and this was causing a crash.
2024-08-04 11:02:09 +01:00
Idriss Fekir 81a68ae758 GimpFontFactory: More reliable font checking
check for font validity (whether it is usable by pango), using
harfbuzz instead of relying on file extentions.

We do this in the first place because pango when given a font it can't
support will look for the closest matching supported font, but we
iterate through all fonts, so that would create redundancy.
2024-08-04 11:02:09 +01:00
Idriss Fekir cd26f49b7a GimpFont: Improve font matching with old XCF files
Compare the font file gotten from the PangoFont object
related to the PangoFontDescription rather than just comparing
font names. This Helps because when pango is given an unsupported
font (Type1 or Bitmap fonts) it choses the closest matching ttf/otf
font, but reports the name of the unsupported font.
2024-08-04 11:02:09 +01:00
Bruno 180f6e1aa0
build/windows: Install crossroad deps in gimp job too
I forgot about it in 101bcca329
2024-08-03 20:25:19 -03:00
Bruno 748908aaf0
gitlab-ci, build/windows: Use Universal variables in native gimp-console wrapper 2024-08-03 20:22:42 -03:00
Yuri Chornoivan 6f387d94b3 Update Ukrainian translation 2024-08-03 18:28:53 +00:00
Yuri Chornoivan 3536841667 Update Ukrainian translation 2024-08-03 18:27:24 +00:00
Yuri Chornoivan d08d095b6f Update Ukrainian translation 2024-08-03 18:26:05 +00:00
Alx Sa 5161c53f3c libgimpwidgets: Make GimpPickButton a derivable type
Per Jehan, we should remove gimppickbutton-default.[ch] and
move the functions into gimppickbutton.c. Then we can
make the GimpPickButtonPrivate API actually private without
any additional public functions.
2024-08-03 18:24:46 +00:00
Alx Sa 0d112b2999 themes: Define background color for GtkToolBar
This widget is used primarily in plug-ins like GFig and IFS Compose
which have toolbar buttons. This patch explicitly defines the style to
prevent system theme leaks and too dark colors on Middle Gray theme.
2024-08-03 12:20:06 +00:00
Jehan be0a4ab12a Issue #11828: Lock Path stroke not working as expected.
The "selected-layers-changed" signal was emitted while there were still
selected channels (which is an inconsistent state). And since
gimp_image_get_selected_drawables() returns selected channels first when
the image has any, vectors_actions_update() was using the previously
selected channel's lock information for deciding which actions to set
sensitive.
2024-08-03 13:34:17 +02:00
Martin 4bef89d0e5 Update Slovenian translation 2024-08-03 10:49:07 +00:00
Jehan 9f5db5c153 Issue #11828: reverting a string change in commit f036812a94.
This had already been handled in commit 8bd3d5e0bb, but somehow the old
name slipped back in commit f036812a94.
2024-08-03 12:45:50 +02:00
Martin bd7bda57b1 Update Slovenian translation 2024-08-03 10:21:03 +00:00
Martin 805c6a3e8a Update Slovenian translation 2024-08-03 10:19:45 +00:00
Martin 76b264a607 Update Slovenian translation 2024-08-03 10:15:09 +00:00
Alx Sa f759b17e45 libgimpwidgets: Reverting GimpPickButton for 80f09fac
Temporarily reverting as the private struct
is shared between various OS versions of
the object and needs to be accessible.
A different approach will be needed to resolve,
and until then, I'd like the Debian pipeline to
work properly.
2024-08-03 08:08:31 +00:00
Alx Sa 80f09fac59 libgimpwidgets: Finish converting classes to derivable type 2024-08-03 06:39:55 +00:00
Ekaterine Papava c1a40a18d3 Update Georgian translation 2024-08-03 04:39:19 +00:00
Ekaterine Papava aa269997d2 Update Georgian translation 2024-08-03 04:37:35 +00:00
Alx Sa 175b50ead5 libgimpthumb, app: Make gimpthumbnail attributes private
Move all public attributes of GimpThumbnail
from the header to a private struct in
GimpThumbnail.c. Also replace direct
access of these attributes in app/core and
app/widget with get/set calls.
2024-08-03 04:25:33 +00:00
Alx Sa 438bc4f229 libgimp, libgimpmodule, libgimpwidgets: Port more widgets to derivable type 2024-08-03 02:48:07 +00:00
Jehan 8d598ec3a3 NEWS: update. 2024-08-03 02:23:31 +02:00
Andre Klapper be944b20c5 Rename "Intelligent Scissors" menu item to "Scissors Select"
Be consistent with tool dialog and tooltip.

Fixes #10793
2024-08-03 00:02:49 +00:00
Jehan bc73232cd9 app, libgimpwidgets: fix CRITICAL on NULL GimpUnit.
I missed this one because it was using 0 instead of the GIMP_UNIT_PIXEL
macro. This was triggering CRITICALs when using the text tool.
2024-08-03 01:50:27 +02:00
Jehan 07196f371b Issue #11865: properly pass ui_meta() from GeglParamColor to GimpParamColor. 2024-08-03 01:50:27 +02:00
Anders Jonsson 9219c1eaba libgimp, plug-ins: update POTFILES.in 2024-08-02 23:02:36 +00:00
Jacob Boerema 0610f60014 libgimp: fix #11421 Some legacy filters have lost their Help button
Legacy plug-ins like Checkerboard (legacy) under Render Patterns lost
their Help button, although using F1 was still working.

Due to changes in how procedures are called, `gimp_dialog_constructed`
was called before the help-id was set.
The simplest way to fix this, is to call
 `G_OBJECT_CLASS (parent_class)->constructed (object);`
at a later time in `gimp_procedure_dialog_constructed` after we have
set the help-id there.
2024-08-02 20:50:29 +00:00
Jehan f8fa0d056d libgimp: fix annotation. 2024-08-02 20:33:46 +02:00
Jehan ea7e1bcc85 libgimpconfig: fixing resetting GeglColor and GimpUnit properties to default values.
After fixing GeglColor arguments in filters, I realized that these
parameters cannot even be resetted (button "Reset" of GEGL filters).
2024-08-02 19:25:33 +02:00
Jehan 318342039d Issue #11422: gimp_prop_widget_new_from_pspec: not supported: GeglParamColor
In all core code, transform GeglParamColor to GimpParamColor with alpha.
2024-08-02 18:44:00 +02:00
Alx Sa 048b2c437d libgimp, libgimpcolor, libgimpconfig: Convert to derivable types
Also converted GimpPreview and
GimpScrolledPreview as they are the
parents of several of these widgets.
2024-08-02 14:02:30 +00:00
Jehan eb1e21f9f7 libgimpbase: some code cleanup I missed. 2024-08-02 15:47:08 +02:00
Jehan 6f4f1e8ccd libgimpbase: remove Returns annotation on function without return value!
Fixes:

> libgimpbase/gimpchoice.c:366: Warning: Gimp: gimp_choice_set_sensitive: invalid return annotation

Introspection step is now fully without any warning! \o/
2024-08-02 14:23:18 +02:00
Jehan 1add3343ad libgimpbase: removing wrong annotations.
I thought that such annotations would work and be useful to tell GIR that
a type is nothing more than a NULL-terminated array of a specific type.
But apparently GIR doesn't like these annotations and complain. So let's
just clean these out.

Fixes:

> ./../../../../../../dev/src/gimp/libgimpbase/gimpparamspecs.h:254: Warning: Gimp: unexpected annotation: array
> ../../../../../../../dev/src/gimp/libgimpbase/gimpparamspecs.h:254: Warning: Gimp: unexpected annotation: element-type
2024-08-02 14:18:44 +02:00
Jehan 624e3772e9 libgimp: new unit tests around GimpImage and item API.
Right now, it only tests a few API, such as creating an image, then a
text layer, then inserting it in the image.

This is a test to avoid regression bug after having fixed #9923 in a
previous commit.
2024-08-02 14:12:10 +02:00
Jehan c1fec7809b meson: built-time run of GIMP should set GIMP3_SYSCONFDIR environment variable.
Without this, build-time GIMP cannot find the etc/ files unless GIMP is
installed. This becomes even more annoying now as I want to run tests
(for GimpUnit) depending on etc/unitrc contents.

This will also ensure that tests run properly in environments where the
etc/unitrc may have been modified.
2024-08-02 12:46:31 +02:00
Jehan a92e694a19 libgimp: new unit tests for GimpUnit. 2024-08-02 12:14:54 +02:00
Jehan d493f0537f Issue #8900 and #9923: reimplementing GimpUnit as a proper class.
This fixes all our GObject Introspection issues with GimpUnit which was
both an enum and an int-derived type of user-defined units *completing*
the enum values. GIR clearly didn't like this!

Now GimpUnit is a proper class and units are unique objects, allowing to
compare them with an identity test (i.e. `unit == gimp_unit_pixel ()`
tells us if unit is the pixel unit or not), which makes it easy to use,
just like with int, yet adding also methods, making for nicer
introspected API.

As an aside, this also fixes #10738, by having all the built-in units
retrievable even if libgimpbase had not been properly initialized with
gimp_base_init().
I haven't checked in details how GIR works to introspect, but it looks
like it loads the library to inspect and runs functions, hence
triggering some CRITICALS because virtual methods (supposed to be
initialized with gimp_base_init() run by libgimp) are not set. This new
code won't trigger any critical because the vtable method are now not
necessary, at least for all built-in units.

Note that GimpUnit is still in libgimpbase. It could have been moved to
libgimp in order to avoid any virtual method table (since we need to
keep core and libgimp side's units in sync, PDB is required), but too
many libgimpwidgets widgets were already using GimpUnit. And technically
most of GimpUnit logic doesn't require PDB (only the creation/sync
part). This is one of the reasons why user-created GimpUnit list is
handled and stored differently from other types of objects.

Globally this simplifies the code a lot too and we don't need separate
implementations of various utils for core and libgimp, which means less
prone to errors.
2024-08-02 10:46:38 +02:00
Alx Sa f9df980585 plug-ins: Convert custom ImageMap icons to vectors
Adds SVG versions of ImageMap custom
icons and conditionally uses them if
have_vector_icons is enabled. If not, we
fall back to the original PNG icons.
Since ImageMap mixes custom and
stock icons, this keeps the icon size
consistent across the UI.

Per Denis Rangelov, tooltips for the
coordinates and area displays as well
as the shortcut menu were added.

Also, removes a reference to IMAP_ARROW
which no longer applies since that icon
was removed in favor of using the stock
cursor icon.
2024-08-02 00:01:55 +00:00
Bruno 75446c4316
gitlab-ci: Clarify a bit better Debian 'build' deps
Clang and others are not GIMP deps 'per se'. GCC also exists.
2024-08-01 19:12:05 -03:00
Bruno 101bcca329
gitlab-ci, build/windows: Separate (again) Debian and Crossroad deps
Despite the good intentions, 4f965557 makes Debian contributors who
follows gimp-web-devel instructions to download more deps than needed
and makes unclear what are the crossroad deps. Let's fix it.
2024-08-01 18:18:34 -03:00
Alx Sa afce1c1f02 libgimpwidgets: Convert more gimpwidgets to derivable type
Continuation of work from 74e7e16e
2024-08-01 03:55:31 +00:00
Alx Sa 9b6e6effeb libgimpwidgets: Make GimpButton a derivable type 2024-07-30 19:04:53 +00:00
Bruno f73bf7fb07
build/windows: Make sources downloading more neutral
This makes crossroad and msys2 scripts clone without the "_" prefix, which
will improve quality of life of most contributors that just clone them.

Just for consistency, also remove the "_" prefix from other pices of code.
2024-07-30 13:05:09 -03:00
Alx Sa 47c7bfba29 libgimp: Make GimpProgressBar a final type 2024-07-30 13:52:26 +00:00
Yuri Chornoivan f543b2c799 Update Ukrainian translation 2024-07-30 11:58:04 +00:00
Bruno bd28861785
build/windows: Refactor MSIX .ps1 a bit to not impose strict SDK or .msixbundle
The original script required a specific WinSDK version. Now, it autodetects.
This is useful if we need to move to another runner and welcome locally too.

Also, downloading the arm64 artifact was mandatory to get a x64 msix, which
is silly. Now, packagers are free to package to either arm64 or x64 alone.
This is useful locally but could be useful on CI too when some arch fail(?).
2024-07-29 18:45:01 -03:00
Alx Sa 60897f1700 plug-ins: Unreference image used in PSD metadata loading
Resolves #11313.
We reference JPEG and TIFF images when
we send them from their loading plug-ins
to the PSD plug-in for PSD formatted
metadata. We should remove this extra
reference when returning the image back
to its original loading plug-in.
2024-07-29 16:10:17 +00:00