Commit Graph

49305 Commits

Author SHA1 Message Date
Luca Bacci 2db0bf1909 Use MessageBoxW () 2023-01-24 14:48:44 +00:00
Luca Bacci 7b9e9ef7b6 Use CreateFileMappingW () 2023-01-24 14:48:44 +00:00
Luca Bacci 3f0ddcb885 Use GetBinaryTypeW () 2023-01-24 14:48:44 +00:00
Luca Bacci 1e24240f5d Use GetLocaleInfoW () 2023-01-24 14:48:44 +00:00
Luca Bacci abe7c53cf5 Use GetStartupInfoW () 2023-01-24 14:48:44 +00:00
Luca Bacci db570de3b2 Use SetDllDirectoryW ()
No need to use GetProcAddress (), SetDllDirectory () is available
since XP SP1
2023-01-24 14:48:44 +00:00
Luca Bacci ed1e4236ba Use GetModuleHandleW ()
Also fix an unwanted ref-count increment on a module HANDLE
2023-01-24 14:48:44 +00:00
Luca Bacci f7be0cf68e Use LoadLibraryW () 2023-01-24 14:48:44 +00:00
Luca Bacci c98ffb7e0e Replace uses of plain fopen () with GLib's g_fopen ()
On Windows fopen () is limited to the current codepage,
GLib's g_fopen () instead accepts full UTF-8 by calling
_wfopen () internally (or a similar wide-char CRT routine).
2023-01-24 14:48:44 +00:00
Luca Bacci afe9625bdb Simpler way to get the module HANDLE 2023-01-24 14:48:44 +00:00
Luca Bacci 0657b85202 Use GLib to convert between UTF-8 and UTF-16 2023-01-24 14:48:44 +00:00
Jehan 48c1d07600 meson: fix cross-building GIMP.
We don't want to fail the build configuration just because we can't test for
runtime dependencies. In such a case, just assume it's good as we at least have
libheif and we can compile.
Fixes:

> ../meson.build:756:2: ERROR: Can not run test applications in this cross environment.
2023-01-24 15:44:50 +01:00
Jehan 4699d9e2ac build, gitlab-ci: using non-ambiguous `meson setup` syntax.
Fixes:

> WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated.
2023-01-24 15:35:30 +01:00
Jehan ba5c423331 Issue #8924: Paste as new image uses the full canvas instead of just…
… the copied selection.
2023-01-24 12:51:30 +01:00
Jehan 2e30a92c0a Issue #8524: add or change some missing or duplicate mnemonics. 2023-01-23 23:38:51 +01:00
Jehan 2aa325a55e libgimpwidgets: new gimp_spin_scale_get_mnemonic_keyval() function.
This solves part of #8524, for properties displaying as spin scale, which have a
mnemonic, yet our code was not able to tell so.
2023-01-23 23:28:15 +01:00
Jehan e4ace369c1 meson: list both AVIF and HEIC mimetype support if the plug-in is built.
Even though, some format support might be missing, since codecs can be added at
runtime, it can always change later without having to touch GIMP. Yet we won't
be able to edit the desktop file when this happens.

See new comments in #9080.
2023-01-23 19:38:19 +01:00
Jehan 706cff2037 meson: VALA language is only needed for the build target.
Without this change, meson outputs this warning:

> meson.build:868: WARNING: add_languages is missing native:, assuming languages are wanted for both host and build
2023-01-23 19:19:10 +01:00
Rodrigo Lledó e4dae320bc Update Spanish translation 2023-01-23 18:14:12 +00:00
Rodrigo Lledó 3229a68e8a Update Spanish translation 2023-01-23 18:08:56 +00:00
Jehan 7b0064107e Issue #9080: Checking for available libheif codecs at compile-time.
From libheif >= 1.14.0, the pkg-config variable will become bogus and always
return 'yes' so we now need to check for codec avaibility at compile time the
same way we look for these at runtime.

It may seem irrelevant to do these checks since these codecs can be added
anytime later, but it's still very good information for packagers to immediately
see that we have runtime package missing.
2023-01-23 19:01:38 +01:00
Jehan 704c868ca1 meson: add a 'name' arg to the IPC_RMID compile/run test.
It makes for easier to read logs and build files. Also fixing a typo in the
original text from autotools.
2023-01-23 18:33:12 +01:00
Jehan decdb2ba3f meson: Improve C99 compatibility of IPC_RMID check.
See previous commit and !810. Porting the autotools fix we made there to the
meson build too.
2023-01-23 18:13:18 +01:00
Florian Weimer 99531e73e9 configure.ac: Improve C99 compatibility of IPC_RMID check
Do not call the undeclared exit function.  Implicit function
declarations are likely not going to be supported by future compilers
by default, changing the outcome of this configure probe with
such compilers.
2023-01-23 16:07:59 +00:00
Martin e7c9b9d073 Update Slovenian translation 2023-01-22 17:30:49 +00:00
Martin 41f838db8b Update Slovenian translation 2023-01-22 17:27:50 +00:00
Ekaterine Papava 4b6ff68094 Update Georgian translation 2023-01-21 15:56:08 +00:00
Ekaterine Papava 6df84c25f1 Update Georgian translation 2023-01-21 15:53:46 +00:00
Jordi Mas 8b2edc0ff8 Update Catalan translation 2023-01-21 09:05:02 +01:00
Rodrigo Lledó c2318f6664 Update Spanish translation 2023-01-20 18:06:46 +00:00
Rodrigo Lledó 37fc28c9f3 Update Spanish translation 2023-01-20 18:01:20 +00:00
Rodrigo Lledó 4a5aefe5bf Update Spanish translation 2023-01-20 17:53:10 +00:00
Rodrigo Lledó 4a846d11e5 Update Spanish translation 2023-01-20 17:47:22 +00:00
Daniel Novomeský 3533606a13 gitlab-ci: fix win64-nightly
ca-certificates are no longer present in gimp-prefix/ssl
but in gimp-prefix/etc/ssl
2023-01-20 14:39:13 +01:00
Daniel Novomeský 12b1890980 flatpak: upgrade exiv2, libheif, libjxl 2023-01-20 12:49:16 +01:00
Alexander Shopov f9281dd8f9 Update Bulgarian translation 2023-01-15 14:40:27 +00:00
Alx Sa d087c1a84e plug-ins: Port Save as CSS GUI from 2.10
This plug-in has a partial GUI (a FileChooser dialog is launched).
However, you could only save the active gradient rather than choosing
any of them like the 2.10 version of this plug-in.
This patch ports the original UI so you can choose both the gradient
and file in interactive mode.
2023-01-14 21:14:45 +00:00
Alx Sa 506b324112 plug-ins: Show GUI for Palette to Gradient
Also shows GUI for Palette to Repeating Gradient function
2023-01-14 21:14:45 +00:00
Jacob Boerema 9ac2178e6e app: update gimphelp-ids.h
Removed several help ids that are not in use anymore.
Fixed spelling of one help id, the spelling has also been fixed in
gimp-help.
2023-01-14 16:02:03 -05:00
Jehan c9b1ce8fa9 plug-ins: make test-dialog runnable even with no image.
It's a test plug-in which doesn't actually need an image to work, so it's
annoying that it currently requires one (making testing more cumbersome).

Also cleaning up a bit the coding style.
2023-01-14 20:17:57 +01:00
Jehan f99bdcd008 plug-ins: use generated widget for GimpPalette arg.
Also make the start checks a bit more robust to broken core code by
double-checking that the palette is valid from the start, even though getting an
invalid palette should normally not happen anymore (at least I fixed one such
case with a palette with a NULL id in my previous commit; but it looks like our
core code is not perfectly robust and we should push the code to extensive
testing).

Note that the generated widget is currently ugly (no label and terrible UX), but
this is meant to improve soon.
2023-01-14 19:27:08 +01:00
Jehan e8365e81e2 libgimp: fix getting invalid resource the first call with a NULL arg.
When the core sends a NULL resource, which would be the default for object args,
hence is also what you get for the first call of a plug-in with a resource
parameter, libgimp was creating a GimpResource with NULL id, which is invalid.
It is much better to return NULL (since we made it so that NULL is a valid
value) and let the plug-in handle the NULL value as it sees fit for a given
parameter (they could just set the contextual resource for this type, or keep
NULL to mean "no resource selected").

This fixes failing to run plug-ins the first time (before any "last" values are
set). E.g. I had the issue when testing palette-sort.

Also I'm improving the error message when trying to use a non-installed resource
(it will now also print the resource ID and the error message). And the GError
was leaking in this case, so I properly free it now.
2023-01-14 19:10:42 +01:00
Jehan 24b955bf17 app, libgimp, pdb: various coding-style fixing and struct for final types…
… moved to the implementation file.

When declaring with G_DECLARE_FINAL_TYPE(), the whole concept is that the struct
is made private (which also allows the type to evolve without breaking ABI if we
some day decide to make the class derivable). For this to make sense, the struct
goes in the implementation file, not the header.

For the rest, it's mostly alignment bugs and the like.
2023-01-14 18:44:31 +01:00
Jehan eae386fbff devel-docs: write dependency name with the namespace casing.
It is apparently how dependency names are supposed to be spelled to be taken
into account. The previous commits fixed some, but missed 2. I'm not sure they
will actually end up in the right-side list of the docs (it looks like when a
dependency is not actually found in the API, it isn't listed there), though it's
at least always listed in the left side, as I can see it.
And while I would prefer the upstream "display" name (i.e. GEGL and babl instead
of Gegl and Babl), better be consistent in how we list these dependencies in the
libgimp and libgimpui docs.

See discussion in !811.
2023-01-14 17:56:32 +01:00
Corey Berla a0e94250eb docs: Fix dependency names
Dependency names need to match the namespace name exactly (including
capitalization) otherwise they won't be shown as dependencies.
2023-01-14 16:50:18 +00:00
lloyd konneker e00f2d7f50 Fix plugins to use new GimpResource. 2023-01-14 17:43:26 +01:00
Jehan 54db045f45 libimp: declaration must be at start of a block.
Fixes:

> libgimp/gimpresourceselectbutton.c:510:9: error: a label can only be part of a statement and a declaration is not a statement
> 510 |         GimpResource *specific_value;

As well as some coding style bug (space after '*').
2023-01-14 16:38:40 +00:00
Jehan d5f4cabfcc libgimp: do not define a class struct when G_DECLARE_FINAL_TYPE is used.
This fixes the VAPI build. I am actually astonished the lib build seem to have
passed and that we didn't get double definition clashes.

The build error was:

[750/2424] Generating libgimp/gimp-ui-3.0.vapi with a custom command
FAILED: libgimp/gimp-ui-3.0.vapi
/usr/bin/vapigen --quiet --library=gimp-ui-3.0 --directory=/builds/GNOME/gimp/_build/libgimp --pkg=babl-0.1 --pkg=cairo-1.0 --pkg=gdk-pixbuf-2.0 --pkg=gegl-0.4 --pkg=gio-2.0 --pkg=glib-2.0 --pkg=gobject-2.0 --pkg=gtk+-3.0 --vapidir=/builds/GNOME/gimp/_build/libgimp --girdir=/builds/GNOME/gimp/_build/libgimp --pkg=gimp-3.0 --metadatadir=/builds/GNOME/gimp/libgimp /builds/GNOME/gimp/_build/libgimp/GimpUi-3.0.gir
GimpUi-3.0.gir:22111.7-22111.33: warning: Virtual method `GimpUi.ResourceSelectButton.draw_interior' conflicts with method of the same name
GimpUi-3.0.gir:26688.73-26688.73: error: The type name `ResourceSelectButtonClass' could not be found
GimpUi-3.0.gir:26695.73-26695.73: error: The type name `ResourceSelectButtonClass' could not be found
GimpUi-3.0.gir:26704.73-26704.73: error: The type name `ResourceSelectButtonClass' could not be found
GimpUi-3.0.gir:26712.73-26712.73: error: The type name `ResourceSelectButtonClass' could not be found
GimpUi-3.0.gir:26720.73-26720.73: error: The type name `ResourceSelectButtonClass' could not be found
2023-01-14 16:38:40 +00:00
lloyd konneker d59a7af38c libgimp: API refactor GUI for GimpResource
Simplifies chooser widgets (e.g. GimpBrushSelect) by eliminating attributes (e.g. opacity) of chosen resource.
See #8745, but this commit fixes that by first refactoring the code.

Refactors GUI widgets (e.g. GimpBrushSelectButton and GimpBrushSelect etc.)

Refactor by "Extract class" GimpResourceSelectButton from GimpBrushSelectButton etc.
This moves common code into an inherited class (formerly called GimpSelectButton)
but the subclasses still exist.
The subclasses mainly just do drawing now.

Refactor by "Extract module" GimpResourceSelect from GimpBrushSelect etc.
Moves common code into one file, generic at runtime on type of GimpResource,
that is, the new code dispatches on type i.e. switch statements.
In the future, when core is changed some of that can be deleted.
The files gimpbrushselect.[c,h] etc. are deleted.
The module adapts the API from core to the API of callbacks to libgimp.

Note that core is running the resource chooser (select) widgets remotely.
Core is still calling back over the wire via PDB with more attributes
than necessary.
The new design gets the attributes from the resource themselves,
instead of receiving them from core callback.
The libgimp side adapts by discarding unneeded attributes.
In the future, core (running choosers for plugins) can be simplified also.

Fix gimp_prop_chooser_brush_new same as other resources.

Finish changes, and clean style.

Annotations
2023-01-14 16:38:40 +00:00
Ekaterine Papava 8d5f470507 Add Georgian translation 2023-01-14 14:38:58 +00:00