Commit Graph

47176 Commits

Author SHA1 Message Date
Jacob Boerema 42fe8abc98 app: fix #5153 keyboard shortcuts Shift+[ and ] don't work on most keyboards
On most keyboards the [ and ] keys are shared with { and }. Which means
that if you press Shift+[ you get {. We were using this key combination
to increase the tool's size by 10 and the other to decrease it by 10.

However, on all keyboards where these keys share the same physical spot
on the keyboard, this wasn't working.
So, let's change the actual keys to do this to { and }.
2021-07-28 13:38:26 -04:00
Jehan de9a171a19 gitlab-ci: generate SHA* checksums for generated Windows installers. 2021-07-27 13:12:45 +02:00
Jehan b824abc113 gitlab-ci: do not run `meson test` anymore inside the flatpak job.
Somehow the test part of the flatpak job stopped working. The last
instance which worked was 3 weeks ago, but after a lot of debugging I
realized that it is not because of any code change on our side. The
exact same commit which worked 3 weeks ago won't anymore!

The standalone bundle is actually built and works fine when tested
independently. What fails is the `meson test` inside the flatpak
environment. Somehow when GIMP is rebuilt inside the test flatpak
environment, it doesn't build the plug-ins yet one of our tests
(save-and-export) requires plug-ins to open some file formats. Note that
I double-checked, the plug-ins were well built and loading any format
works fine in the standalone flatpak, just not in this specific step.

I am completely unsure what broke, yet it is apparently outside GIMP
code. So for now, I just copy-paste the whole flatpak job which we were
including from another repository and remove the `meson test` part.
2021-07-26 01:25:43 +02:00
Anders Jonsson 3b8165fd0d Update Swedish translation 2021-07-25 20:17:09 +00:00
Piotr Drąg d6e39f31c0 Update Polish translation 2021-07-25 12:52:47 +02:00
Yuri Chornoivan db7e00533a Update Ukrainian translation 2021-07-24 06:30:55 +00:00
Jacob Boerema e0707af073 plug-ins: fix #1146 DICOM with big endian transfer syntax fails to load.
Our plug-in was not correctly handling DICOM images that use big endian
transfer syntax, which is deprecated.

We add support for that here, add a few g_debug statements to make future
debugging easier, and also return an error when we encounter a transfer
syntax that we can't handle instead of blindly continuing.
2021-07-23 14:55:37 -04:00
Jacob Boerema 3733a36d84 plug-ins: add support for planar configuration in DICOM images.
Part 1 of the fix for #1146.

In addition to that we also add some g_debug statements to make it easier
to determine certain image info.
2021-07-23 14:55:37 -04:00
Jehan 9e95d44895 build: forgot a patch for a dependency of the flatpak build. 2021-07-22 17:54:48 +02:00
Jehan f8f768c077 app: adding a comment for translators.
As per comment by Alexandre Franke, so that translators are aware this
is not about a "map" like a "world map", but like "mapping" filters.

Cf. https://gitlab.gnome.org/Teams/Translation/fr/-/issues/17#note_1209282
2021-07-22 17:11:16 +02:00
Jehan 58fd168f8e build: update OpenEXR in our nightly flatpak manifest.
Synced from the beta flatpak. The previous manifest rules were building
fine on Flathub build servers, but not on GNOME CI ones. It resulted in
a bunch of "ISO C++17" errors when building ilmbase.

Maybe just restricting to C++14 through build fine would have been fine,
but anyway let's also update the dependencies in the same time as we
were outdated.
2021-07-22 16:37:15 +02:00
Jehan 3e2207e1e0 build: update the master flatpak.
As per state in the wip/release/2-99-8 branch of the beta flatpak.
In particular, we update some dependencies (poppler, ghostscript and
SuiteSparse).

It should also fix the master flatpak build which seemed to fail on
downloading SuiteSparse sources. Since their upstream moved their
tarballs to be downloaded from Github, it should take care of this issue
by side effect.
2021-07-22 13:00:54 +02:00
Michael McLaughlin 3b3f34cd22 Issue #6994: Color Noise produces artifacts with highly saturated…
… source colors

Reviewer's (Jehan) note: a git blame shows this is a clear bug
introduced in commit 9d19bf2a3e, which was a cleanup patch, and the
BOUNDS() macro was not doing exactly the same thing as the code before
the change.
2021-07-17 18:58:16 +02:00
Jehan 681d8e7454 build: MSYS2 python package is now Python 3.9.
The MSYS2 package got recently bumped from 3.8 to 3.9.6.

At first I wanted to update our packaging and installer scripts to be
more generic using glob patterns (so that they should work now and
should continue to work even if bumping to a higher minor version in the
future). Unfortunately this would work for `package-gimp-msys2.sh` but
in `files.isi`, it would only work for `libpython3.*.dll`, not for the
python3.9/ folder. InnoSetup apparently doesn't support using a folder
as source (or maybe just a folder with glob like `python3.*`) as it
resulted in a "No files found matching" error.

So leave everything with the accurate version (because anyway it's much
better to get an early failure than only at the very last step).
2021-07-17 15:25:22 +02:00
Jehan bd71814e8b build: bump GTK to 3.24.30.
Same as MSYS2, add a patch to fix keyboard input when using IMEs (which
should hopefully fix #1603). Note that this patch should be in the next
release.

Also remove the Windows Pointer Input Stack support as it is in 3.24.30.

Finally apply the patch from gtk!3661 for testing (instead of the patch
from gtk!3275), as it is supposed to fix #5475. This is the reason why
we still build our own GTK3.
2021-07-17 15:25:22 +02:00
Piotr Drąg 2e115d1170 Update Polish translation 2021-07-11 12:34:40 +02:00
Jehan 8ca232252a libgimpwidgets: fix incomplete relocatable build commit.
Commit 8025962a20 was meant to make the icon code work on relocatable
builds, yet I realize that the gdk_pixbuf_new_from_file() calls were
still using the DATAROOTDIR build-time macro. I had forgotten to update
these.

Also update a bit the error handling by adding a GError (for more
debugging info) and a newline for pretty-printing.
2021-07-07 20:20:31 +02:00
Michael Schumacher 7f0dafe571 plug-ins: use #!/usr/bin/env python3 shebang line in python-console.py
Fixes #7035.
2021-07-07 17:47:15 +02:00
Jehan 74f67c180e build: compile GTK with new Windows Pointer Input Stack support.
We don't know when the next GTK3 release will be and this is cool enough
that we want to test it soonish, even more with MR !458 coming soon with
a Preferences option.
2021-07-07 13:12:42 +02:00
Jehan ad86717b9b build: custom GTK3 compilation for the Windows installer. 2021-07-07 13:12:34 +02:00
Jehan 4a00a993f2 libgimpwidgets: use g_printerr() instead of g_warning() for app icons.
Unit testing consider warnings as criticals and doesn't like when it
cannot find the installed application icons. To fix the `make check`,
just print the missing icon information to stderr, but don't make it a
GLib warning.
2021-07-06 18:51:16 +02:00
Jehan 2d801596be desktop: add scalable/gimp.svg to distributed tarball.
This is part of fixing the distcheck.
2021-07-06 18:51:16 +02:00
Jehan 97ae281162 Revert "gitlab-ci: install GIMP before running `make check`."
This reverts commit fe329adcf5.
`make check` is meant to be working even without `make install`. Also
this didn't fix anything anyway.
2021-07-06 18:51:16 +02:00
Jehan fe329adcf5 gitlab-ci: install GIMP before running `make check`.
Since GIMP looks for its icons at runtime and would output warnings if
it doesn't find them, it's better to install first. Not really sure it's
ideal though, but it will do for now. Maybe I should just g_printerr()
instead of g_warning().
2021-07-06 15:54:37 +02:00
Jehan 8025962a20 libgimpwidgets: fix meson/mingw-w64 build and relocatable builds.
While passing the DATADIR macro works fine natively on Linux, it somehow
failed with the mingw-w64 build with a very weird error:

> <command-line>: error: expected identifier or '(' before string constant

I could not understand what it means, as the '-DDATADIR="/some/path"'
syntax is completely fine as far as I can see.
Anyway since I see that DATAROOTDIR is already defined in meson config.h
(but not in the autotools build, just the meson one!), and using
datarootdir instead of datadir seems to be just fine (actually maybe
even more appropriate when it comes to looking up the hicolor
application icons), I just switched to using it.

In the same time, I realized that my code using build-time macros won't
work for relocatable builds anyway. So this commit also adds a bit of
code path variant using gimp_installation_directory() in the case of
ENABLE_RELOCATABLE_RESOURCES code path.
2021-07-06 13:37:33 +02:00
Jehan b7c2fbe6a8 desktop: install 64x64 app icon.
For some reason, this size was installed in the meson build, not the
autotools one.
2021-07-06 11:38:33 +02:00
Jehan 3598562472 app, libgimpwidgets: drop the thumbnail icon feature.
From years of discussions, it turns out that:
- The thumbnailed-Wilber icon replacing the generic icon of GIMP often
  makes the application harder to spot in the icon list of running
  processes.
- In single-window mode in particular, it makes even less sense as we
  just show the one active image anyway.
- Even in multi-window mode, nowadays many OSes or desktop group windows
  of a same application under one icon. So we end up with several image
  windows under a thumbnail only showing the top image. This happens in
  KDE, GNOME, Cinnamon and Windows at least apparently (as far as is
  being reported).
- Some platforms would just use only the OS-declared icon and not care
  about runtime-declared ones. This is apparently the case on macOS, and
  also on GNOME when the desktop file is seen by the desktop
  environment. So all our code about generating thumbnailed icon is
  wasted on these platform anyway.
- When intensively testing the current behavior, I had cases when the
  icon was not properly updated. We could of course investigate and fix
  the issues, but considering all the previous points, it might make
  more sense to simply drop the feature which is mostly useless, or
  worse bothersome, hence simplify the code greatly.
- Finally API to set icons from GdkPixbuf data has been removed in GTK4.
  So long term, trying to keep this whole machinery feels like just
  making our life difficult for a feature which all OSes seem to
  deprecate and which might not be possible anymore soon (or just get
  harder and harder to implement).

Note that I don't use gtk_window_set_default_icon_name() because it
would use the icon from our theme, yet so far we are not sure it makes
sense for the application icon which we probably always want to be the
same, whatever the chosen theme. Finally I just list various common icon
sizes because GTK API doesn't seem to be clever enough yet. I can't just
give it 1 SVG image (e.g. with gtk_window_set_default_icon_from_file())
and hope it does the resizing at the last minute. It turns out it
doesn't and we get an extra-small icon. So instead, let's generate
common sizes ourselves from the same SVG.
2021-07-06 11:21:37 +02:00
Jehan 36f103c95f desktop: install a scalable GIMP icon too.
The source is still desktop/src/gimp.svg.
2021-07-06 11:21:37 +02:00
Yuri Chornoivan f5eed269e4 Update Ukrainian translation 2021-07-05 16:43:54 +00:00
Jehan d3105e5c72 app: add a comment and some newlines before the debug data section.
The markdown triple-quote (```) has to be on its own at the start of a
newline. Schumaml was telling me that too many reporters would paste
just after some text, which would therefore break the markdown syntax.

Instead let's add 3 newlines before the triple-quote, so that even
people who would not hit the "Copy Bug Information" button (but instead
select and copy) have a hint that these newlines are made on purpose.
Also add a comment (which is discarded by Gitlab) to make this even more
obvious.

Then even when pasting just after some text on the same line, the
triple-quote will end up on its own line.
2021-07-05 16:44:54 +02:00
Jehan 086ae77929 app: new gimp_display_grab_focus() function.
The goal of this function is to give the focus to the active image
display. This is implemented as a core GimpDisplay virtual function
(with the actual implementation in GimpDisplayImpl), allowing to be used
even in core code, without actual GUI code (this was not necessary right
now, but I think it will be useful in future use).

This function is now called from the toolbox code (cf. 2 commits
earlier), avoiding code duplication. I also added a usage at the end of
toolbox_paste_received() so that a newly opened image by middle-click
paste in the toolbox directly gains focus.
2021-07-05 15:31:36 +02:00
Jehan 2d123b8290 app: fix wrong unref-ing.
Testing this middle-click opening of image by their PATH/URI in the
toolbox, I realized there was a bug. The original author was obviously
intending to unref the toolbox which was ref-ed when calling
gtk_clipboard_request_text(), not freeing the toolbox context, which
could have dire consequences!

Fixes this CRITICAL:

> g_object_unref: assertion 'G_IS_OBJECT (object)' failed
2021-07-05 13:01:47 +02:00
Jehan 3d9996f1a6 Issue #6869: Toolbox buttons should focus the canvas as side effect.
Toolbox buttons don't require focus keeping (no further keyboard input
needed and navigating through/selecting tools can be done in various
other ways with a keyboard), which is why I removed focusability of
toolbox buttons years ago (cf. commit c83ee61c07).

Nevertheless this is not enough, and since toolbox is meant to work on
the canvas anyway, let's give back canvas focus as soon as any click
happens on dead areas of the toolbox, as well as on the Wilber (dnd)
drawing, but also each time a toolbox button is selected (though not on
the longer clicks to see tool groups' contents without selecting a tool
in the end).
This will allow to directly start working on the image without requiring
a click first (for instance panning with Space or similar interactions
which would not give focus to the image canvas).

This can also count as an alternative to the "Esc" shortcut to get
canvas focus back, with a mouse click instead of a keyboard key.
2021-07-05 12:45:24 +02:00
Jehan 68851c1aaa Issue #5875: Close button too big on wayland backend.
The issue is that on X11, the window manager draws the title bar hence
uses the window-close button from the system theme, though on Wayland,
GTK draws its own decorations. Since we provide a window-close, we end
up with a disparity between this button and the minimize/maximize
buttons.

For now, let's just get rid of the window-close icon as an easy
solution, thus GIMP will always use the window-close icon from system
theme.

Maybe we can restore our own window-close icon later, but we should make
sure to at least have also window-maximize and window-minimize icons so
that the 3 buttons next to each others won't look too mismatched. And
probably we should also have smaller-size design because it doesn't look
so nice when huge (though it might simply have been the size mismatch
which gave this feeling).
2021-07-05 11:04:13 +02:00
Luna Jernberg 62b332ee24 Update Swedish translation 2021-07-01 15:49:42 +00:00
Jehan 179334b618 build: do not copy a binary dependency when it already exists.
The dll_link script would overwrite the same dependencies over and over,
for instance when needed for several binaries, but worse when available
in several source directories. In our case, we look up 2 source
directories: our install prefix first, then the prefix for MSYS2
pre-built packages. So it turns out we would be overriding any
custom-built package also installed through MSYS2 (such as our patched
GLib, see my previous commits).

As a side effect, it should also make the packaging step faster as we
don't re-copy unecessarily the same DLLs over and over again. The first
one to go in stays in.
2021-06-29 12:50:45 +02:00
Jehan dc3cc6fb26 build: move glib-networking modules into our custom glib prefix.
Since gio searches its modules based on the paths as advertized by the
pkg-config, let's just move the pre-compiled modules (by MSYS2
packages). We build the same version of glib2 with the same options, and
only one additional patch. So this should not be a problem to use the
pre-built modules rather than rebuilding glib-networking too.
2021-06-28 14:48:16 +02:00
Jehan 9572cb43bd gitlab-ci: keep the Windows native builds' config.log.
This helps debugging the builds when needed.
2021-06-28 14:48:16 +02:00
Jehan 74d3ad700a build: custom build of GLib with additional patch.
The MSYS2 package for glib2 does not include the patch to reduce delays
of disconnected volumes (glib!2020).
Let's make our own build in our CI for our installer (hence also
experimenting overriding MSYS2 packages when necessary).

Except for this patch, this is the same build as MSYS2 and same option,
as described in:
https://github.com/msys2/MINGW-packages/tree/master/mingw-w64-glib2
2021-06-28 14:48:16 +02:00
Jehan 63f75471f5 build: some cleanup in build scripts for Windows.
We had some weird conflicting files errors in the CI. I think our weird
file removal is not needed anymore. So get rid of the ugly cleanup hack.
2021-06-28 14:47:57 +02:00
Rodrigo Lledó 98cad6dedc Update Spanish translation 2021-06-28 09:08:16 +00:00
Yuri Chornoivan 0d42693c55 Update Ukrainian translation 2021-06-18 19:04:37 +00:00
Jehan 1a3efe09f8 desktop: make validate-desktop a unit test.
Instead of a target, let's make it a test. Also I realize it already
existed as desktop_file test. But it's simpler to run it directly (no
need of an external script).

Note: I still leave the test-desktop.sh script as it is used for the
autotools test.
2021-06-18 21:00:38 +02:00
Jehan 0e4263d800 build, gitlab-ci: generated files should be in the build dir.
Also update the CI script to copy the generated language files before
creating the installer so that the gimp3264.iss script finds them.
2021-06-18 20:40:04 +02:00
Jehan 602add8c45 build: improve the script to test for Windows installer languages.
We were only comparing the po list with the language list in the
gimp3264.iss. Nevertheless since we also generate the <code>.setup.isl
files, we should also verify generated files corresponds exactly to the
same list of languages.
This commit does it for meson and autotools build.

This is also how I fixed the meson list (cf. previous commit).
2021-06-18 20:27:33 +02:00
Jehan a6c44a7191 build: complete Windows installer lang list in meson and fix iconv…
… conversion when some characters are not convertible.

Currently failed conversion ended up in incomplete .isl files (autotools
build) or would break the build (meson build). Ideally we should use a
target encoding which contains all source characters, but we use the
encoding as set upstream in the LanguageCodePage for the given language
file.
I'm not sure if maybe we can mix the encoding by adding our own
LanguageCodePage at the top of our generated <code>.setup.isl, then we
could just use UTF-8 for any language. It will have to be tested.

For now let's just discard non-convertible characters, assuming there
shouldn't be too many of these. It's the lesser evil in this situation.
2021-06-18 20:22:04 +02:00
Jehan 2d6bf6dec5 meson.build: fix more xmllint validation.
The authors.xml validation was also not run. This is nearly the last of
getting rid of run_target(). There is still the desktop file validation
but it doesn't have any output argument. We'll see how we update this
last one.

The only other usages of run_target() are proper usage (creating
'install-*' targets).
2021-06-18 16:09:25 +02:00
Jehan 2730361928 data: fix more xmllint validation.
Similarly to the previous commit, the tips and tags validation was never
happening as it was implemented as a custom top-level meson target. It
was not run during a normal build. Now it is.
2021-06-18 15:46:41 +02:00
Jehan 19e545bc1f menus: fix validating the XML menu files with meson build.
Basically the build was never running this target (unless maybe in some
edge cases as could be demonstrated by the Arch repository build, though
it doesn't look they did anything particular; this is how we discovered
the bug #6447 as this was not run on our own local or CI builds).
Reading the docs of run_target(), it may actually have been normal.
run_target() looks to be only about creating top-level targets (which
one could run with `ninja validate_menus` in our case for instance), not
actually running the command (i.e. badly named function).

For the command to be actually run on a normal build, let's use a
custom_target() as proposed by Paolo Bonzini. After testing, the xmllint
validation is properly run on a normal build and dependency works fine
with both the source XML and generated XML files (touching these files
trigger a rebuild).
The output of xmllint is stored in some dummy file, which is only useful
to prevent re-running the command at each build even though source XML
were unchanged (so it's more of a flag file).

See discussion in #6447.
2021-06-18 15:18:23 +02:00
Mayank Suman 38cda060b3 libgimp: tooltip added to all widgets in GimpProcedureDialog
Appropriate tooltip is displayed for all widgets in GimpProcedureDialog.
2021-06-18 16:43:26 +05:30