Commit Graph

47577 Commits

Author SHA1 Message Date
Jacob Boerema 206bc06eab app: fix Gimp-Config warning Can't tell anything about a gint64.
When running gimp-console-2.99.exe --dump-gimprc-system we get two
warnings:
(gimp-console-2.99.exe:23000): Gimp-Config-WARNING **: 16:08:29.604:
 FIXME: Can't tell anything about a gint64.

Let's fix this by adding G_TYPE_INT64 as a known integer value.
2021-10-12 11:11:17 -04:00
Jehan 52928e04a5 Issue #7327: Cannot build GIMP3 on MSYS2 using Meson.
This is untested on my side, because the bug only happens on native
builds with meson (our CI has cross-builds with meson and native builds
with autotools and I only do cross-builds locally) but I think/hope it
will work.

Basically we were using .full_path() because these rc files were also
used as input of some configure_file() calls which doesn't like custom
target objects as input (it wants strings or file objects). Yet a bug
in meson didn't like the colon used in native Windows full paths ('C:'
and such) when used in windows.compile_resources(). This has been fixed
by Luca Bacci in: https://github.com/mesonbuild/meson/pull/9368
Yet we just cannot depend on very early meson (or worse dev meson code).

On the other hand, if the input is a custom_tgt object, it uses the
object ID which we give as first parameter of custom_target() so we know
it's appropriately named without colons (such as 'gimp_plugins_rc').
Thus we should not bump into this issue again.

For the few usage in configure_file(), I just add a .full_path() only
when needed at call time.

Last but not least, I replace the bogus `meson --version` call by a
`python3 -c 'exit()'` as advised by Eli Schwartz:
2afa019c70 (note_1284951)

The reason is that it is apparently possible (or will be when some
reimplementation of meson will be done) that the `meson` executable
itself does not exist. On the other hand, `python3` should always be
there, as a mandatory dependency of the build tool.

In order to use an appropriate `python3`, I made the
pythonmod.find_installation() check required in our build (which should
not be a problem since it's a meson requirement as well), even when the
-Dpython option is false (this one depends on other requirements too
anyway, such as version and pygobject). This way I can call this meson
variable of discovered python in my bogus call, instead of calling a
(potentially different) python from PATH environment.
2021-10-12 17:06:18 +02:00
Jehan e43d6217fa libgimpwidgets: fix warnings on Windows/macOS.
The variables `screen` and `display` are only for the GDK_WINDOWING_X11
code path.

Fixing the following warnings:

libgimpwidgets/gimpwidgetsutils.c: In function 'gimp_monitor_get_color_profile':
libgimpwidgets/gimpwidgetsutils.c:502:21: warning: unused variable 'screen' [-Wunused-variable]
  502 |   GdkScreen        *screen;
      |                     ^~~~~~
libgimpwidgets/gimpwidgetsutils.c:501:21: warning: variable 'display' set but not used [-Wunused-but-set-variable]
  501 |   GdkDisplay       *display;
      |                     ^~~~~~~
2021-10-12 17:05:47 +02:00
Bruno Lopes da Silva e06125a240 Update Brazilian Portuguese translation
(cherry picked from commit 9b7889e4de)
2021-10-11 21:02:43 +00:00
Sveinn í Felli 5482595641 Update Icelandic translation 2021-10-11 13:29:44 +00:00
Sveinn í Felli 27e92a5be9 Update Icelandic translation 2021-10-11 13:24:42 +00:00
Sveinn í Felli cda2e68af5 Update Icelandic translation 2021-10-11 13:22:43 +00:00
Marco Ciampa 8167a8a870 Updated Italian translation 2021-10-11 13:15:10 +02:00
Sveinn í Felli 9c667b048d Update Icelandic translation 2021-10-11 07:04:33 +00:00
Sveinn í Felli 9a76db4d5f Update Icelandic translation 2021-10-11 06:34:48 +00:00
Jiri Grönroos 808869cdf6 Update Finnish translation
(cherry picked from commit dc5379cf72)
2021-10-11 06:22:23 +00:00
Sveinn í Felli c2143fd200 Update Icelandic translation 2021-10-10 21:31:19 +00:00
Jordi Mas 08cdb54e34 Update Catalan translation 2021-10-10 21:40:44 +02:00
Anders Jonsson 4d5d0decd1 Update Swedish translation 2021-10-10 19:01:27 +00:00
Sveinn í Felli 28758fc686 Update Icelandic translation 2021-10-10 18:20:04 +00:00
Hugo Carvalho 5905b26571 Update Portuguese translation 2021-10-10 13:20:00 +00:00
Jehan 3aa9c0b161 build: do not use os.EX_* exit code for cross-compatibility.
All the os.EX_* constants are Unix-only (and possibly not even not on
all Unix/Linux-like platforms, according to docs) so we should not use
them, especially for a script which we may use on Windows (we also run
it when cross-compiling from Linux, but natively on Windows as well).

Fixes this exception (which would only happen when there is another
critical issue anyway, so it's not making a bigger problem; yet it's
better to cleanly exit with an error code rather than by an exception):

>   File "C:\_r\_builds\k3_3muaB\0\GNOME\gimp\build\windows\gitlab-ci\dll_link.py", line 124, in copy_dlls
    sys.exit(os.EX_DATAERR)
> AttributeError: module 'os' has no attribute 'EX_DATAERR'
2021-10-10 13:56:09 +02:00
Yuri Chornoivan eb20d656da Update Ukrainian translation 2021-10-10 11:44:25 +00:00
Jehan 9cdc8c085d desktop: add release tag for the AppData. 2021-10-10 13:30:41 +02:00
Jehan fa710178f6 build: use several source prefixes for all dll_link usage.
See commit 31e52f0756.
2021-10-10 13:19:30 +02:00
Jehan 73930f9d46 NEWS: update.
Adding some smaller changes which are probably noteworthy enough for the
NEWS file.

Also the selection (marching ants) not displaying fix for Wayland was
confirmed to also fix the same issue for macOS BigSur.
2021-10-10 13:16:41 +02:00
Lukas Oberhuber 219d9b4e1a Reduces noisy errors
Also avoids code that can't run properly on a Mac anyway.
2021-10-09 17:32:58 +01:00
Rodrigo Lledó d7f93b3aa1 Update Spanish translation 2021-10-08 14:22:45 +00:00
Rodrigo Lledó 2ad19b0e1f Update Spanish translation 2021-10-07 14:03:01 +00:00
Hugo Carvalho 43e2e804b4 Update Portuguese translation 2021-10-06 22:03:27 +00:00
Hugo Carvalho a287ef2fbb Update Portuguese translation 2021-10-06 21:42:06 +00:00
Hugo Carvalho a0570cbc75 Update Portuguese translation 2021-10-06 21:39:12 +00:00
Hugo Carvalho b803fca037 Update Portuguese translation 2021-10-06 21:35:54 +00:00
Hugo Carvalho e4065c4d45 Update Portuguese translation 2021-10-06 21:31:34 +00:00
Hugo Carvalho c2dfbb5c2f Update Portuguese translation 2021-10-06 21:20:06 +00:00
Hugo Carvalho 1114d955ac Update Portuguese translation 2021-10-06 21:08:40 +00:00
Daniel Novomesky c4e5c185cc HEIF plug-in: fix typo in comment 2021-10-06 14:35:54 +02:00
Jehan 31e52f0756 build: allow giving several source prefixes to dll_link.py.
Also use it to fix packaging of GIMP for the Windows installer (native
CI job). The CI was indeed failing to package libbrotlienc.dll,
dependency of libjxl.dll, for the simple reason that they were on
different prefixes. By calling dll_link.py on one prefix, then the
other, we were failing to grab the deeper dependency. Now with this new
ability to set several sources, the script is able to search everywhere
(with first prefix given on the CLI call as priority).
2021-10-05 02:53:38 +02:00
Lukas Oberhuber 5ff5d38985 Macro name change to GDK_OSX_BIGSUR 2021-10-04 20:40:30 +00:00
Lukas Oberhuber 0ac0e4bdc9 gdkquartz-cocoa-access.h is not correct yet 2021-10-04 20:06:35 +00:00
Daniel Novomesky dd5cb5cef1 Crash workaround for HEIF plug-in 2021-10-03 15:11:25 +00:00
Piotr Drąg 9c4c7b5d52 Update Polish translation 2021-10-03 13:29:09 +02:00
Lukas Oberhuber e14f9fc500 app: allow compiling on Mac OS where gimpimagewindow.c needs…
… an API that went private in GTK 3.

Note from reviewer (Jehan): this API became public again in commit
gtk@242b76a7, available since GTK 3.24.29. Before this, the function 
(gdk_quartz_window_get_nswindow()) was actually still in the ABI, so we
could declare the function locally before using it. This is an ugly
workaround, but it works.
What we do is providing both solutions depending on GTK version, leaving
build warnings as constant reminders so that we remember to get rid of
the workaround when we bump minimum GTK requirement.

Cf. discussions in gtk#2452 and gimp!483.
2021-10-03 11:20:15 +00:00
Lukas Oberhuber f87ec4bcfe libgimpbase: GError set twice in gimpreloc.c
This patch fixes a double free error due to a pointer being freed and 
then not nulled out.
It appears this is corrupting memory on MacOS as the `/proc` file system 
is not available and therefore multiple errors are returned.

Fixes:

(process:54873): GLib-WARNING **: 23:09:25.976: GError set over the top of
a previous GError or uninitialized memory.
This indicates a bug in someone's code. You must ensure an error is NULL
before it's set.
The overwriting error message was: Error opening file /proc/self/maps: No
such file or directory
_br_find_exe: (NULL)gimp-console(54873,0x100957e00) malloc: *** error for
object 0x103f09e80: pointer being freed was not allocated
gimp-console(54873,0x100957e00) malloc: *** set a breakpoint in
malloc_error_break to debug
2021-10-03 00:29:15 +00:00
Anders Jonsson d33c45fb47 Update Swedish translation 2021-10-02 12:14:41 +00:00
Jordi Mas 1791c17946 Update Catalan translation 2021-10-01 23:27:05 +02:00
Jehan 6107ae17c9 build: build libjxl to sync nightly and beta flatpak manifest.
See commit e9f790e1ff8d50f63933ec0b0fbb9325447324d4 on Flathub's beta
flatpak repository.
2021-10-01 23:09:50 +02:00
Jehan e61adec232 plug-ins: more g_file_get_path() changed to g_file_peek_path().
Also some g_unlink() changed into g_file_delete().

And a g_file_get_path() followed by g_path_get_basename() changed into
g_file_get_basename() only.
2021-10-01 22:59:53 +02:00
Jehan 60b9f4a2d5 NEWS: update. 2021-10-01 22:33:10 +02:00
Jehan 4055ac95e6 build: add more help text to the windows-installer-langs test.
I always have to search again the InnoSetup repository for the language
file. Add the link in the failed test output so that we don't waste time
searching the next time.

Also when the new lang is "Unofficial", the installer script has to be
updated as well, because these lang files must be downloaded. Add a help
text saying this as well.
2021-10-01 21:51:22 +02:00
Jehan 3ace66ecbb build: add Portuguese translation to installer.
Translation files were added in commit cec3c3a159 but not to the
installer and build files, which is why "gimp-distcheck-debian" job was
failing in the CI.
2021-10-01 21:18:43 +02:00
Jehan 9cd9c34251 build: improve gimp:build / windows-installer-langs unit test.
Also sort the po files to make sure all lists are ordered the same way.
2021-10-01 21:17:24 +02:00
Jehan f131780777 plug-ins: clean up warnings from psd-save.
These warnings only happens on debug output, so it's not huge bugs, yet
it's always better not to have warnings at build time.

Most are printf format type warnings, and one is because of uncomplete
switch() cases.
2021-10-01 19:43:49 +02:00
Jehan 4ae3687c88 plug-ins: more replacement of g_file_get_path() to g_file_peek_path().
While doing this cleanup, I found at least several other string leaks
in: file-compressor, file-gegl, file-pdf-save, file-raw-data, file-xwd,
jpeg-load, psd-save…
So it's quite worth it!

Note: in file-pdf-save, there is a global variable file_name which seems
to be happily leaked without caring (didn't look in details, but looks
so). I didn't fix this one which will require a bit more in-depth logics
care.
2021-10-01 19:37:59 +02:00
Jehan 27dea4f7f7 plug-ins: various g_file_get_path() replaced by g_file_peek_path().
As explained in previous commits, the _peek_ call is advantageous
because:
- It is less bug-prone as we don't have to handle freeing the string. In
  all the cases I changed, I even spotted at least 2 cases where we were
  leaking a string (in file-mng, `temp_file_name` is never freed; and we
  were also leaking in an error case of gfig).
- As a consequence of the previous point: simpler code with less lines.
- In local file cases, the _peek_ variant does not even need to allocate
  an additional string.
- In other case, if we query several times the path, it is allocated
  once and cached so it stays efficient.
- When possible, working on the GFile rather than on a path string may
  be more robust. For instance I changed one g_unlink() into a
  g_file_delete(). Actually most reading/writing should be done with the
  GIO API when possible, but I didn't want to change too much code
  logics on this commit.
2021-10-01 18:47:30 +02:00