Commit Graph

46547 Commits

Author SHA1 Message Date
Daniel Mustieles af7f46eb65 Update Spanish translation 2021-01-01 09:30:37 +00:00
Jehan ce9bfdca8d libgimp: always keep the same number of columns for metadata settings.
I was trying to avoid too large dialogs as this `metadata` frame can
hold random plug-in settings. But let's go for always the same number as
columns as the max number of common settings (i.e. most often 3
columns).
2020-12-30 22:34:49 +01:00
Jehan ba4f24e49c plug-ins: set parent_window parameter to Screenshot function of portal…
… org.freedesktop.portal.Desktop (X11 only).
If we don't set this parameter appropriately, the created dialog is not
modal/transient relatively to the main GIMP window. This is especially
annoying because in my tests (GNOME shell), the screenshot dialog would
appear behind GIMP window, which makes it feel like broken behavior.

Note that the supported handles are X11 only so far. We'll need to
generate the appropriate Wayland handles too (created from xdg_foreign
protocol).
2020-12-30 22:22:55 +01:00
Anders Jonsson dcddb2f150 Update Swedish translation 2020-12-30 18:00:31 +00:00
Anders Jonsson a4d3b5ecd3 Update Swedish translation 2020-12-30 17:48:15 +00:00
Jehan aab1d0c227 plug-ins: do not show our own dialog with Freedesktop screenshot portal.
Today I have only re-tested the GNOME implementation (in particular not
the KDE one) of the portal API org.freedesktop.portal.Screenshot but I
assume it is similar because the dbus function does not provide any
useful options anyway. This is why the portal comes with its own dialog
providing the various common screenshot features (delay, window picking,
area selection, etc.). Showing our dialog first is therefore redundant.

Also I updated setting the monitor profile only in the case where the
loaded image result from the portal did not have an embedded profile. To
be fair, the GNOME implementation at least does not embed a profile to
this day. So this is only for the future case where they will finally do
the right thing and embed the display profile (or for other desktops'
implementations where they maybe already do the right thing).
2020-12-30 17:29:17 +01:00
Jehan a29ece23b9 plug-ins: screenshot_x11_available() should not always return TRUE.
This was true in the "old world" where X11 support being built-in meant
that X11 screenshot would be usable. Now we must not only check it is
built, but also that we are actually running under X11. Otherwise with a
Wayland compositor, screenshot would fail. Also it meant that the
Freedesktop portal was never tried if both X11 and Wayland support were
built-in.
2020-12-30 16:14:13 +01:00
Jehan 929311f208 libgimp: improve gimp_procedure_dialog_check_mnemonic().
Use gtk_widget_list_mnemonic_labels() to look for mnemonic of common GTK
widgets. Also warn when several mnemonic were set on a given widget
("wasting" keys when it seems we are always looking for available
mnemonics).
Also warn with core action IDs too when they miss a mnemonic.
2020-12-30 13:31:16 +01:00
Niels De Graef fa4eb263a0 plug-ins: screenshot: Remove GDK_NATIVE_WINDOW_POINTER
It's a GTK+ 2.0 construct, so anything within such an `#if` will be dead
code anyway.
2020-12-30 12:23:34 +01:00
Niels De Graef 5a1dd584e9 app: Partially correct gimp_window_get_native_id()
Most important of all, we shouldn't assume that if a given GDK backend
is enabled at compile time, that this is also the one that is being
used. For example, on Linux, both `GDK_WINDOWING_X11` and
`GDK_WINDOWING_WAYLAND` can be set, but you still need to do a runtime
check if you're running under one WM or the the other.

A small cleanup is that we immediately check if a widget is realized by
checking if it's `GdkWindow` is NULL or not and return immediately
(since we need to check its type later on anyway).

Finally, we can remove `GDK_NATIVE_WINDOW_POINTER` as that is a GTK+ 2.0
construct, so it's dead code anyway.
2020-12-30 12:23:22 +01:00
Niels De Graef 273486a625 libgimp: Don't use g_message() for log message
`g_message()` will end up as a dialog shown to the user, but we can be
pretty sure that they won't understand what this message means.
2020-12-30 12:21:46 +01:00
Niels De Graef 226f3707de libgimp: progress: partially fix native window id
Update `gimp_window_get_native_id()` a little to be more correct
(although it still won't work on Wayland).

Most important of all, we shouldn't assume that if a given GDK backend
is enabled at compile time, that this is also the one that is being
used. For example, on Linux, both `GDK_WINDOWING_X11` and
`GDK_WINDOWING_WAYLAND` can be set, but you still need to do a runtime
check if you're running under one WM or the the other.

A small cleanup is that we immediately check if a widget is realized by
checking if it's `GdkWindow` is NULL or not and return immediately
(since we need to check its type later on anyway).

Finally, we can remove `GDK_NATIVE_WINDOW_POINTER` as that is a GTK+ 2.0
construct, so it's dead code anyway.
2020-12-30 10:49:54 +01:00
Niels De Graef e8b6ba5c10 libgimpwidgets: Set transient_for on scrolledpreview
This makes sure that the navigation popup actually shows up on certain
window managers (like those based on Wayland).
2020-12-30 10:24:48 +01:00
Niels De Graef f1aae9ad6d app: tagpopup: Try to set transient-for property
Setting the `"transient-for`" property for popups is important to
certain window managers (such as Wayland), so that they know what the
parent surface is and can position the popup accordingly.

This fixes the `GimpTagPopup` in wayland giving a critical message, and
getting a random position somewhere on the screen.
2020-12-30 09:15:17 +00:00
dimspingos 4a48ea44dc Updated Greek translation 2020-12-30 00:19:29 +02:00
Niels De Graef 6dc3cb16dd devel-docs: Update libgimpwidgets3-sections.txt
Some functions have been removed while others got added.
2020-12-29 23:07:07 +01:00
Niels De Graef fa44c5dc85 libgimp: Fix SaveProcedure properties gtkdoc 2020-12-29 22:53:40 +01:00
Niels De Graef 4d100cc20c app: Use g_object_notify_by_pspec for GimpItem
`g_object_notify()` actually takes a global lock to look up the property
by its name, which means there is a performance hit (albeit tiny) every
time this function is called. For this reason, we should try to use
`g_object_notify_by_pspec()` instead.
2020-12-29 22:37:24 +01:00
Niels De Graef 434107731a libgimpwidgets: Use g_object_notify_by_pspec for zoommodel
`g_object_notify()` actually takes a global lock to look up the property
by its name, which means there is a performance hit (albeit tiny) every
time this function is called. For this reason, we should try to use
`g_object_notify_by_pspec()` instead.
2020-12-29 22:14:19 +01:00
Niels De Graef 76e380244b libgimpwidgets: Use g_object_notify_by_pspec for ruler
`g_object_notify()` actually takes a global lock to look up the property
by its name, which means there is a performance hit (albeit tiny) every
time this function is called. For this reason, we should try to use
`g_object_notify_by_pspec()` instead.
2020-12-29 22:14:19 +01:00
Aurimas Černius 1023197ca7 Update Lithuanian translation 2020-12-29 20:40:57 +00:00
dimspingos 1ba3052c66 Updated Greek translation 2020-12-29 21:50:24 +02:00
dimspingos 918a1c4499 Updated Greek translation 2020-12-29 21:27:18 +02:00
Jacob Boerema b3f3120e32 libgimpwidgets, app: silence warnings about State 0 for GimpRuler and GtkScrolledWindow doesn't match state 128 set via gtk_style_context_set_state ()
When run with GIMP_DEBUG=Gtk we get a lot of debug warnings for GimpRuler and once in a while for GtkScrolledWindow that State 0
doesn't match state 128 set via gtk_style_context_set_state (). This happens because we didn't enter the current state flags of
the widget but 0 and apparently Gtk isn't happy about that.

Let's fix this by using the actual state flags by calling gtk_widget_get_state_flags.
2020-12-28 14:05:09 -05:00
Jehan c21859ebc4 Issue #6142: plugin crash exporting as jpg.
This issue is happening on all 4 plug-ins using the new API, it would
seem, but only on Windows.
Looking at stack trace, I believe we might simply be freeing a mutex
twice because dispose() is allowed to be called several times. Let's
make this finalize() code instead (the data freeing we do there looks
much more adapted for finalize() anyway).
2020-12-26 07:22:52 +01:00
Niels De Graef df28349c17 GIR: Try to return more specific GtkWidget subclass
In GTK, a common scheme is to let a function creating a specific widget
to return a `GtkWidget *`, rather than the specific subtype, since you
often need to call API of GtkWidget, avoiding some useless casts.

For bindings however (and especially bindings to compiled languages),
this is a bit annoying, as you have to explicitly change the type of the
return value (downcast), which is not trivial (or at least desirable) in
each language.

Luckily, we can use `(type ...)` annotation for this use case, leaving
the C API unchanged, while improving the experience for bindings.
2020-12-25 15:05:16 +01:00
Niels De Graef e34c051d78 gimpintcombobox: Add (array length) annotation
So that bindings can properly use the array constructor
2020-12-25 15:04:21 +01:00
Niels De Graef bba70f5869 gimpparamspecs: Add annotations about array length
Although most GObject bindings can't really deal with struct fields,
it's still a nice thing to be able to see that these are actually arrays
(it also becomes visible in the Vala VAPI file).
2020-12-25 15:02:44 +01:00
Niels De Graef 73252da4f4 GIR: Add some missing (nullable) annotations 2020-12-25 15:02:09 +01:00
Yuri Chornoivan b38d55b1f7 Update Ukrainian translation 2020-12-23 06:48:05 +00:00
Jehan 50a0f49762 devel-docs: some small release-howto updates. 2020-12-23 01:54:10 +01:00
Jehan 72effc5a57 configure.ac, meson.build: post-release version bump to 2.99.5. 2020-12-22 23:58:16 +01:00
Jehan db996f218d Release development version GIMP 2.99.4. 2020-12-22 23:39:07 +01:00
Jehan 9fc87b8d91 authors: update the authors list.
Adding names of people with significant contributions:
- Jacob Boerema for his awesome work (on too much stuff to list it all!)
- Daniel Novomesky (HEIF, AVIF support)
- Félix Piédallu (meson build)
- Elad Shahar (Python 3 plug-ins, Spyrogimp, Mandala symmetry
  kaleidoscope mode)
2020-12-22 23:39:07 +01:00
Jehan b1abc5b6a6 app: improve Paint Select Tool description.
Based on other tools wording, as well as the algorithm description. In
any case, it looks a bit better than the previous description (with a
typo even).
2020-12-22 23:13:45 +01:00
Alexandre Prokoudine d89f28db1c Update/fix Russian translation 2020-12-22 23:42:34 +03:00
Jehan 588626dec1 desktop: update appdata with dates. 2020-12-22 20:55:06 +01:00
Michael Natterer 82391c136b devel-docs: some updates to release-howto.txt 2020-12-22 20:40:31 +01:00
Jehan e5aa146f76 docs, etc: regenerate the default gimprc and its manpage. 2020-12-22 20:25:35 +01:00
Jordi Mas d4392d0bc6 Update Catalan translation 2020-12-22 20:10:01 +01:00
Jehan 5520b5531d NEWS: update. 2020-12-22 19:44:09 +01:00
Érico Rolim dfbf1d5d7b app/widgets/gimpactiongroup: protect against calling gettext with NULL msgid
Use the same conditional that was being used for
g_dpgettext2(entries[i].tooltip) with gettext(entries[i].tooltip).
2020-12-20 22:06:35 -03:00
Érico Rolim aa151a08a0 app/dialogs: protect against calling gettext(NULL).
In gimp_dialog_factory_register_entry(), strings were passed to gettext
without checking for a NULL pointer. The gettext documentation [1]
points out that that's undefined behavior, and musl libc's
implementation of gettext segfaults in that case.

[1] https://www.gnu.org/software/gettext/manual/gettext.html#Interface-to-gettext
2020-12-20 22:06:35 -03:00
bartoszek daea111efc autotools: bump GEGL dependency to 0.4.28. 2020-12-20 17:01:00 +00:00
Øyvind Kolås 2d5aa81456 depend on GEGL-0.4.28 2020-12-20 13:37:08 +01:00
Piotr Drąg 8040813a4f Update Polish translation 2020-12-20 12:42:38 +01:00
Yuri Chornoivan 277a086c68 Update Ukrainian translation 2020-12-20 07:43:44 +00:00
Jehan 15c1e04c27 INSTALL: update a bit the installation instructions. 2020-12-20 04:00:06 +01:00
Jehan 2ffedd1db6 desktop: AppData updated for upcoming 2.99.4 release. 2020-12-20 02:22:52 +01:00
Jehan d9b25b8b50 app: do not ask about conversion for an image using a preferred profile.
If setting a RGB or Grayscale "preferred" profile, it usually means
these are profiles we are commonly working with, and it is to be
expected that images one might load may already have said profile. In
this case, don't ask what to do with this profile (keep, convert…). The
graphist kind of already answered this by explicitly listing this
profile as a "preferred" one.

Note that I also check for the built-in profile equality, though it
doesn't look like it is useful (gimp_image_get_color_profile() will
return NULL for an imported image which uses the built-in profile).
This is mostly to be thorough.
2020-12-20 02:04:51 +01:00