Matthias Clasen [Wed, 6 Oct 2021 00:09:20 +0000 (20:09 -0400)]
inspector: Export gtk_inspector_init
Quietly export this function mainly for the benefit
of libadwaita, which can can use this to install its
implementation of the gtk-inspector-page extension
point.
Pierre Ossman [Mon, 4 Oct 2021 07:23:39 +0000 (09:23 +0200)]
searchenginemodel: finalize search results
It is necessary to signal the search engine that we are finished and
that we found something for it to reliably show the results. It would
sometimes work anyway since it is sufficient if any backend signals
completion. However if GtkSearchEngineModel was the only backend
returning results then things would break.
Matthias Clasen [Sun, 3 Oct 2021 18:51:03 +0000 (14:51 -0400)]
contentdeserializer: Plug a small memleak
Found by asan in ci. We intern the mimetypes
when they are registered, so there is no need
to leak this string.
Matthias Clasen [Wed, 29 Sep 2021 03:04:56 +0000 (23:04 -0400)]
a11y: Simplify atspi context a bit
We don't really need a bus-address property
that gets copied for every single object.
We keep the address in object data on the
display anyway. Just use it from there.
This gets rid of a nice amount of strdups
at startup.
Matthias Clasen [Tue, 28 Sep 2021 19:47:06 +0000 (15:47 -0400)]
docs: Mention popovers in the migration guide
Things have changed around popovers, we should mention
that.
Matthias Clasen [Tue, 28 Sep 2021 19:40:41 +0000 (15:40 -0400)]
entry: Clarify docs
Mention that max length is in characters.
Matthias Clasen [Mon, 27 Sep 2021 20:40:29 +0000 (16:40 -0400)]
coloreditor: Don't unref unless we own it
Calling gtk_widget_class_bind_template_child does
*not* give you a reference that you need to unref.
It manages the reference for you. So calling
g_clear_object on such a member is wrong.
Matthias Clasen [Mon, 27 Sep 2021 20:38:32 +0000 (16:38 -0400)]
builder: Don't leak refs
We sometimes end up setting an object on a GValue
that we are then not interested in. We need to
unset it, or we'll leak the ref.
Jordan Yelloz [Tue, 21 Sep 2021 15:47:32 +0000 (08:47 -0700)]
gtktextview: Fixed arrow key crash.
When pressing the keyboard arrows to move around when the insertion point is
hidden, it causes an assertion error in blink_cb.
Insertion point blinks should only be scheduled when blinking is enabled and the
insertion point is visible.
Closes #4275
Martin Kühl [Tue, 21 Sep 2021 14:56:47 +0000 (16:56 +0200)]
gtkcomposetable: Accept long replacement strings
This change removes the assertions limiting replacement strings in the compose table to be less than 20 characters.
The limit seems arbitrary, is not required, will break some users' setups, and problems with it result in applications not launching.
Fixes #4273
Lukáš Tyrychtr [Mon, 20 Sep 2021 08:52:16 +0000 (10:52 +0200)]
Mention that after setting a button child the user is responsible for a11y relations
Matthias Clasen [Sun, 19 Sep 2021 12:26:14 +0000 (08:26 -0400)]
resources: Treat svgs as xml
They can have their whitespace removed just the same.
Matthias Clasen [Sun, 19 Sep 2021 12:13:46 +0000 (08:13 -0400)]
Clean up gesture icons
These had duplicate drawing in them, and were
saved with all the extra Inkscape data.
Timm Bäder [Fri, 27 Aug 2021 14:37:37 +0000 (16:37 +0200)]
stackswitcher: Expand child buttons
Fixes #4196
Georges Basile Stavracas Neto [Sat, 18 Sep 2021 03:17:36 +0000 (00:17 -0300)]
filechooserwidget: Return an id in get_choice()
gtk_file_chooser_widget_get_choice() is supposed to return the option
id of the choice, but it currently is returning the option label.
Return the option id instead.
Georges Basile Stavracas Neto [Sat, 18 Sep 2021 03:14:55 +0000 (00:14 -0300)]
filechooserwidget: Match choice id from "options"
When choices are added to the file chooser widget, the options of
that choice are stored object data under the "options" key. However,
gtk_file_chooser_widget_set_choice() was checking for "choices".
Retrieve the options from the "options" key stored data object data.
Matthias Clasen [Fri, 17 Sep 2021 11:43:07 +0000 (07:43 -0400)]
gsk: Add a test for transform_bounds
James Westman [Fri, 17 Sep 2021 04:53:42 +0000 (23:53 -0500)]
gtkcolorbutton: Fix documentation
Benjamin Otte [Wed, 15 Sep 2021 04:53:15 +0000 (06:53 +0200)]
testsuite: remove box-order test
The test used to test that GtkBox ordered it's children left-to-right in
CSS, no matter the text direction or pack-type.
But there is neither a pack-type anymore nor does GTK4 do that.
So that test has been broken for yers, it just didn't render anything
wrong.
muradm [Thu, 16 Sep 2021 14:53:00 +0000 (17:53 +0300)]
Do not require wayland-protocols as dependency in the .pc file
Basically, I was building some packages on Guix. I figured out that
wayland-protocols was listed among propagated-inputs for gtk+ package
(gtk-3-24). propagated-inputs holds a list of runtime dependencies,
that should be available to any other package that depends on gtk+.
While discussing we clarified that wayland-protocols is not runtime
dependency. So I moved it to native-inputs of gtk+ package, which
means that, this dependency will be available only to gtk+ package and
only at build time. Once moved, building of other applications that
depening on gtk+ started to fail.
Investigation showed that, all .pc (pkg-config) files prepared by gtk+
package, was including:
Requires.private: ... wayland-protocols ...
Since it becomes requirement, other applications was failing with
missing dependency wayland-protocols of dependency gtk+, for instance:
-- Checking for module 'gtk+-3.0'
-- Package 'wayland-protocols', required by 'gdk-3.0', not found
While actually wayland-protocols is not even a build time dependency
of application that depends on gtk+. Advertisement of such
requirement, is a bit misleading, because one does not need it at
runtime, especially applications based on gtk.
Jakub Steiner [Thu, 16 Sep 2021 10:47:26 +0000 (12:47 +0200)]
theme: make toggled tbuttons in toolbars visible
- do what Alex does in libadwaita
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/4264
Matthias Clasen [Wed, 15 Sep 2021 19:08:13 +0000 (15:08 -0400)]
Update the README
Remove the mention of GNU (since that has not been case
for a long time, effectively), state that GTK is hosted
by the GNOME project, and point to GNOME as a place
for donations.
Matthias Clasen [Tue, 14 Sep 2021 20:10:39 +0000 (16:10 -0400)]
testsuite: Call g_test_init in test binaries
Without it, we mess out on G_DEBUG=fatal-warnings,
so our ci does not alert us that we run a bunch of
tests which spit out warnings.
Lukáš Tyrychtr [Tue, 14 Sep 2021 12:33:30 +0000 (14:33 +0200)]
Fix generation of accessible description in presence of described by relations
The loop going through the relation list should have stopped on the NULL sentinel value, however it never accesed the next list element.
Matthias Clasen [Tue, 14 Sep 2021 12:24:36 +0000 (08:24 -0400)]
testsuite: Fix a few memory leaks
These are keeping the asan build in ci from passing.
Lukáš Tyrychtr [Tue, 14 Sep 2021 12:26:18 +0000 (14:26 +0200)]
Set correct accessible relations for GtkMenuButton
Up until now, as the focus was moved to the inner button, it was not possible for
assistive technologies to determine the correct labels and descriptions
because developers could set them only for the parent widget.
Now, the proper relations are added so the labels should be picked up properly.
Fixes #4254
Alexander Mikhaylenko [Tue, 14 Sep 2021 07:23:03 +0000 (12:23 +0500)]
media-controls: Make play button flat
Match the volume button.
Alexander Mikhaylenko [Tue, 14 Sep 2021 07:22:45 +0000 (12:22 +0500)]
searchbar: Vertically center the close button
Julian Sparber [Mon, 13 Sep 2021 14:29:30 +0000 (16:29 +0200)]
stack: Dispose children before emitting items-changed
This makes sure that the `GListModel` returned by
`gtk_stack_get_pages()` actually has the items removed before
`items-changed` is emitted.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4255
Matthias Clasen [Mon, 6 Sep 2021 05:37:51 +0000 (01:37 -0400)]
GtkApplication: Call setlocale early
If we don't call setlocale early enough,
--help output may come out misformatted.
Fixes: #4234
Matthias Clasen [Sat, 4 Sep 2021 18:46:32 +0000 (14:46 -0400)]
textview: Invalidate Pango contexts
We need to invalidate the Pango contexts when
font settings change. Use the new helper
gtk_widget_update_pango_context to make it less
likely that we forget to update some things.
Matthias Clasen [Sat, 4 Sep 2021 19:35:11 +0000 (15:35 -0400)]
widget: Provide a helper for updating pango contexts
Matthias Clasen [Sat, 4 Sep 2021 19:16:25 +0000 (15:16 -0400)]
Rename an internal function
It occupies a name I want to reuse for something else.
Emmanuele Bassi [Sat, 4 Sep 2021 17:56:08 +0000 (18:56 +0100)]
Improve the gtk_accelerator_parse() docs
We need to escape the modifiers in angular brackets, or Markdown will
consider them as HTML tags.
We also should document the modifiers we're parsing.
Matthias Clasen [Fri, 3 Sep 2021 17:55:39 +0000 (13:55 -0400)]
widget: Redraw when font options change
Its the right thing to do, even if it is a rare event.
Simon McVittie [Thu, 2 Sep 2021 21:34:14 +0000 (22:34 +0100)]
reftest-compare: Treat colour channels as undefined if alpha is zero
If the alpha channel is zero, it doesn't matter what the values of the
red, green and blue channels are: the pixel is still fully transparent.
On most architectures, fully transparent pixels end up all-zeroes
(fully transparent black), matching what's in the reference PNG file;
but on mips*el the blend-difference and blend-normal tests get all-ones
(fully transparent white) and a test failure.
Resolves: https://gitlab.gnome.org/GNOME/gtk/-/issues/4227
Signed-off-by: Simon McVittie <smcv@debian.org>
Christoph Reiter [Thu, 26 Aug 2021 03:14:18 +0000 (05:14 +0200)]
build: fix implicit-fallthrough errors with clang
The clang build fails due to -Werror=implicit-fallthrough being
on by default and some fallthrough cases not being marked as such.
Use G_GNUC_FALLTHROUGH or duplicate the code in those cases.
Rafał Dzięgiel [Wed, 25 Aug 2021 08:08:44 +0000 (10:08 +0200)]
Fix wrong gettext ITS target
The installed ITS rule filename is "gtk4builder.its". The .loc file
is wrongly pointing to old "gtkbuilder.its" which makes gettext fail
on systems without GTK3 installed.
Emmanuele Bassi [Tue, 24 Aug 2021 00:11:15 +0000 (01:11 +0100)]
Release an extra reference on GtkExpander:child
The child of a GtkExpander is owned directly by the expander whenever
the "expanded" flag is unset.
We are adding an additional reference to the child of an expander when
expander is not expanded.
Additionally, if a GtkExpander is disposed while not expanded, we need
to explicitly release the reference on the child widget that we own.
This reference leak was masked in GTK3 by GtkContainer removing each
child from the parent container by recursively calling
gtk_widget_destroy().
Qiu Wenbo [Mon, 23 Aug 2021 16:24:08 +0000 (00:24 +0800)]
docs: Fix documentation for gtk_icon_view_create_drag_icon
Fixes: #4190
Kalev Lember [Mon, 23 Aug 2021 13:38:46 +0000 (15:38 +0200)]
build: Fix detection for pre-compiled css files
The default theme changed from Adwaita to Default and this tripped up
the logic to detect if the tarball builds contain pre-built css files or
not. Fix this by looking at pre-compiled css files in themes/Default/
instead of themes/Adwaita/.
Benjamin Otte [Sun, 22 Aug 2021 18:49:12 +0000 (18:49 +0000)]
docs: Expand gdk_clipboard_set() docs
Rūdolfs Mazurs [Sun, 31 Oct 2021 14:59:22 +0000 (14:59 +0000)]
Update Latvian translation
Jordi Mas i Hernandez [Fri, 29 Oct 2021 11:45:56 +0000 (11:45 +0000)]
Update Catalan translation
Alexey Rubtsov [Fri, 29 Oct 2021 11:06:26 +0000 (11:06 +0000)]
Update Russian translation
Benjamin Otte [Wed, 27 Oct 2021 01:02:45 +0000 (01:02 +0000)]
Merge branch 'cherry-pick-
ac8c4245' into 'gtk-4-4'
css: Don't throw warnings on broken URL in image css
See merge request GNOME/gtk!4098
Benjamin Otte [Tue, 26 Oct 2021 15:02:56 +0000 (17:02 +0200)]
css: Don't throw warnings on broken URL in image css
If a URL can't be loaded, we might end up with a NULL file. Handle that
case properly by creating an invalid image instead and don't crash or
complain to stderr when files are NULL.
This was broken since
0886ade182f1a958024202d5c20248d57fcdb053
A new reftest has been included. We need a reftest instead of a
CSS parser test, because the error only becomes visible when
compute()ing the actual image.
Fixes #4373
(cherry picked from commit
ac8c4245b2fb2f1fe8e660c4ad2541efb39cf3d6)
Rūdolfs Mazurs [Mon, 25 Oct 2021 16:59:50 +0000 (16:59 +0000)]
Update Latvian translation
Benjamin Otte [Fri, 22 Oct 2021 18:17:42 +0000 (18:17 +0000)]
Merge branch 'cherry-pick-
3c9c7a0e' into 'gtk-4-4'
build: Make sure ifuncs exist when using fp16
See merge request GNOME/gtk!4089
Benjamin Otte [Fri, 22 Oct 2021 14:31:40 +0000 (16:31 +0200)]
build: Make sure ifuncs exist when using fp16
Fixes msys compiles on Windows (and everywhere else hopefully).
Fixes #4285
(cherry picked from commit
3c9c7a0e727eb6380bee29120736dba6da2232a3)
Goran Vidović [Thu, 21 Oct 2021 10:51:24 +0000 (10:51 +0000)]
Update Croatian translation
Matthias Clasen [Tue, 19 Oct 2021 11:36:44 +0000 (11:36 +0000)]
Merge branch 'gtk-4-4nodate' into 'gtk-4-4'
Drop date attribute from our appdata files
See merge request GNOME/gtk!4077
Bernhard M. Wiedemann [Mon, 6 Sep 2021 08:05:31 +0000 (10:05 +0200)]
Drop date attribute from our appdata files
in order to make builds reproducible.
See https://reproducible-builds.org/ for why this is good
This was suggested by Matthias Clasen as an alternative to MR !3929
Benjamin Otte [Sat, 16 Oct 2021 17:04:55 +0000 (17:04 +0000)]
Merge branch 'backport-mr-3930-to-gtk-4-4' into 'gtk-4-4'
Fix DND coordinates on Windows
See merge request GNOME/gtk!4049
Sveinn í Felli [Tue, 12 Oct 2021 22:48:01 +0000 (22:48 +0000)]
Update Icelandic translation
Rafael Fontenelle [Tue, 12 Oct 2021 17:33:41 +0000 (17:33 +0000)]
Update Brazilian Portuguese translation
Benjamin Otte [Mon, 11 Oct 2021 19:47:37 +0000 (19:47 +0000)]
Merge branch 'cherry-pick-
d89e82d4' into 'gtk-4-4'
Merge branch 'wip/otte/for-master' into 'gtk-4-4'
See merge request GNOME/gtk!4055
Benjamin Otte [Mon, 11 Oct 2021 18:36:20 +0000 (18:36 +0000)]
Merge branch 'wip/otte/for-master' into 'master'
x11: Don't try to move destroyed windows
See merge request GNOME/gtk!4054
(cherry picked from commit
d89e82d4a082febfe44d3504786fcab91eab62a3)
f40ce51a x11: Don't try to move destroyed windows
Asier Sarasua Garmendia [Fri, 8 Oct 2021 17:44:18 +0000 (17:44 +0000)]
Update Basque translation
Luca Bacci [Mon, 6 Sep 2021 16:54:30 +0000 (18:54 +0200)]
Fix DND coordinates on Windows
Luca Bacci [Sat, 4 Sep 2021 12:12:54 +0000 (14:12 +0200)]
Make the DND indicator not interfere with the drag and drop operation
Dušan Kazik [Mon, 4 Oct 2021 13:20:03 +0000 (13:20 +0000)]
Update Slovak translation
Asier Sarasua Garmendia [Sun, 3 Oct 2021 07:12:30 +0000 (07:12 +0000)]
Update Basque translation
Daniel Șerbănescu [Thu, 30 Sep 2021 12:40:26 +0000 (12:40 +0000)]
Update Romanian translation
Sveinn í Felli [Wed, 29 Sep 2021 12:04:41 +0000 (12:04 +0000)]
Update Icelandic translation
Kukuh Syafaat [Wed, 29 Sep 2021 05:57:08 +0000 (05:57 +0000)]
Update Indonesian translation
Matthias Clasen [Wed, 29 Sep 2021 00:36:34 +0000 (00:36 +0000)]
Merge branch 'cherry-pick-
d61c71c3' into 'gtk-4-4'
macos: Actually set the vfuncs
See merge request GNOME/gtk!4007
Benjamin Otte [Fri, 24 Sep 2021 20:11:22 +0000 (22:11 +0200)]
macos: Actually set the vfuncs
(cherry picked from commit
d61c71c3780e06cdc13599aa3a334f3124bab276)
Yaron Shahrabani [Tue, 28 Sep 2021 20:27:52 +0000 (20:27 +0000)]
Update Hebrew translation
Daniel Mustieles [Tue, 28 Sep 2021 10:31:04 +0000 (12:31 +0200)]
Updated Spanish translation
Hugo Carvalho [Sun, 26 Sep 2021 19:58:52 +0000 (19:58 +0000)]
Update Portuguese translation
Goran Vidović [Sun, 26 Sep 2021 16:40:30 +0000 (16:40 +0000)]
Update Croatian translation
Goran Vidović [Sun, 26 Sep 2021 16:38:22 +0000 (16:38 +0000)]
Update Croatian translation
Piotr Drąg [Sun, 26 Sep 2021 15:22:36 +0000 (17:22 +0200)]
Update Polish translation
Aurimas Černius [Sun, 26 Sep 2021 14:22:50 +0000 (17:22 +0300)]
Updated Lithuanian translation
Emin Tufan Çetin [Sun, 26 Sep 2021 12:21:46 +0000 (12:21 +0000)]
Update Turkish translation
Matej Urbančič [Sun, 26 Sep 2021 11:03:51 +0000 (11:03 +0000)]
Update Slovenian translation
Мирослав Николић [Sun, 26 Sep 2021 05:51:31 +0000 (05:51 +0000)]
Update Serbian translation
Мирослав Николић [Sun, 26 Sep 2021 05:33:02 +0000 (05:33 +0000)]
Update Serbian translation
Rafael Fontenelle [Sat, 25 Sep 2021 13:57:40 +0000 (13:57 +0000)]
Update Brazilian Portuguese translation
Danial Behzadi [Sat, 25 Sep 2021 10:21:18 +0000 (10:21 +0000)]
Update Persian translation
Charles Monzat [Sat, 25 Sep 2021 07:04:51 +0000 (07:04 +0000)]
Update French translation
Christian Hergert [Thu, 23 Sep 2021 02:41:06 +0000 (19:41 -0700)]
textview: improve undo grouping when overwriting
We want to group in more than one undo group when removing a selection
and replacing it with a new character or characters, unless we're
replacing a single character. In that case, the natural thing is to treat
it as an atomic change.
Christian Hergert [Thu, 23 Sep 2021 00:08:02 +0000 (17:08 -0700)]
texthistory: add barriers after final grouping
We don't want to allow new items to be grouped into a previous action
group after the end_user_action() is called. This ensures that we add a
barrier action in those conditions.
Fixes #4276
Fran Dieguez [Fri, 24 Sep 2021 22:37:55 +0000 (22:37 +0000)]
Update Galician translation
Yuri Chornoivan [Fri, 24 Sep 2021 17:06:11 +0000 (17:06 +0000)]
Update Ukrainian translation
Anders Jonsson [Fri, 24 Sep 2021 14:40:07 +0000 (14:40 +0000)]
Update Swedish translation
Marek Černocký [Fri, 24 Sep 2021 13:23:33 +0000 (15:23 +0200)]
Updated Czech translation
Benjamin Otte [Fri, 24 Sep 2021 12:22:19 +0000 (12:22 +0000)]
Merge branch 'wip/otte/for-4-4' into 'gtk-4-4'
GL: improve intiialization
See merge request GNOME/gtk!3993
Benjamin Otte [Thu, 23 Sep 2021 23:47:03 +0000 (01:47 +0200)]
gdk: Make sure only one GL backend is used
Creative people managed to create an X11 display and a Wayland display
at once, thereby getting EGL and GLX involved in a fight to the death
over the ownership of the glFoo() symbolspace.
A way to force such a fight with available tools here is (on Wayland)
running something like:
GTK_INSPECTOR_DISPLAY=:1 GTK_DEBUG=interactive gtk4-demo
Related: xdg-desktop-portal-gnome#5
Benjamin Otte [Tue, 24 Aug 2021 19:27:49 +0000 (21:27 +0200)]
wayland: Better error on eglGetDisplay() failure
Goals:
1. Provide as much information as possible in the error message, so
users can try to fix their system themselves.
2. Try to formulate the error message in a way that explains that this
is not something GTK can fix, but a lower layer problem.
Related: #4193
Emin Tufan Çetin [Sun, 19 Sep 2021 17:15:24 +0000 (17:15 +0000)]
Update Turkish translation
Matthias Clasen [Fri, 17 Sep 2021 11:21:36 +0000 (11:21 +0000)]
Merge branch 'fix-win32-shader-check' into 'gtk-4-4'
gdkglcontext-win32-wgl.c: Fix Cairo fallback check
See merge request GNOME/gtk!3964
Chun-wei Fan [Fri, 17 Sep 2021 09:08:23 +0000 (17:08 +0800)]
gdkdisplay-win32.c: Don't retry WGL initialization
On Windows, GLES is not that widely available unless one installs wrapper
libraries such as libANGLE, so GLES/EGL support on Windows is used more like
a fallback mode if Desktop OpenGL (WGL) support is inadequate on the system.
Hence, unless one forces WGL or EGL, we will first try to initialize WGL, and
then try to initialize GLES if enabled and if WGL initialization failed, and
then just return whatever the last result we can obtain from these
initialization attempts, since unlike X11 EGL contexts, we do not have
separate modes for WGL except for legacy and non-legacy contexts.
Chun-wei Fan [Fri, 17 Sep 2021 03:09:23 +0000 (11:09 +0800)]
gdkglcontext-win32-wgl.c: Fix Cairo fallback check
We were setting the WGL pixel format in GdkWin32Display too early, so the code
does not bail out correctly when we retry establishing the WGL context.
Fix this by pushing back setting the WGL pixel format only after it passes the
shader availability check.
Should fix issue #4257.
Boyuan Yang [Wed, 15 Sep 2021 18:56:14 +0000 (18:56 +0000)]
Update Chinese (China) translation
Dz Chen [Wed, 15 Sep 2021 15:37:48 +0000 (15:37 +0000)]
Update Chinese (China) translation
Daniel Mustieles [Wed, 15 Sep 2021 06:43:45 +0000 (08:43 +0200)]
Updated Spanish translation
Daniel Mustieles [Wed, 15 Sep 2021 06:29:59 +0000 (08:29 +0200)]
Updated Spanish translation
Alan Mortensen [Mon, 13 Sep 2021 18:48:55 +0000 (20:48 +0200)]
Updated Danish translation of gtk-properties