Commit Graph

70877 Commits

Author SHA1 Message Date
Emmanuele Bassi
2fb975b22e docs: Fix typo in link 2021-11-10 13:51:08 -05:00
Emmanuele Bassi
d64f9360c3 docs: Fix wrong fragments in type links
Due to a bug in gi-docgen we're not getting a warning if a fragment to a
type does not match the actual type, and we're generating a broken link.

See: https://gitlab.gnome.org/GNOME/gi-docgen/-/merge_requests/120
2021-11-10 13:49:24 -05:00
Marco Melorio
2d75485c24 docs: Tag Gdk.ModifierType as flags 2021-11-10 13:48:43 -05:00
Matthias Clasen
5d158f583c Merge branch 'pango-api-4-4' into 'gtk-4-4'
Handle (and ignore) new Pango api

See merge request GNOME/gtk!4145
2021-11-10 17:31:48 +00:00
Benjamin Otte
106d35f2f4 Merge branch 'cherry-pick-0903ad48' into 'gtk-4-4'
css: Don't crash when color stop offsets descend

See merge request GNOME/gtk!4144
2021-11-10 17:15:41 +00:00
Matthias Clasen
c09e7fabc8 Handle (and ignore) new Pango api
The PangoVariant enumeration grew some new
members. Ignore them.
2021-11-10 12:07:41 -05:00
Benjamin Otte
481ab5cf49 Merge branch 'wip/otte/for-master' into 'master'
css: Don't crash when color stop offsets descend

Closes #4424

See merge request GNOME/gtk!4143

(cherry picked from commit 0903ad48f0)

46f8600b css: Don't crash when color stop offsets descend
2021-11-10 16:48:59 +00:00
Alexey Rubtsov
ae1eb55271 Update Russian translation 2021-11-09 12:42:16 +00:00
Milo Casagrande
3eb1ca3ecb Update Italian translation 2021-11-09 08:52:14 +00:00
Milo Casagrande
4fa318fa19 Update Italian translation 2021-11-09 08:34:39 +00:00
Matthias Clasen
3090fbac82 4.4.1 4.4.1 2021-11-01 09:20:12 -04:00
Matthias Clasen
56e61fc645 NEWS: Updates 2021-10-31 18:23:10 -04:00
Maxim Zakharov
f41d98d104 gtk: Hold reference on controller until events are fully handled
Fixes premature controller unreferencing in
gtk_event_controller_handle_event() if the controller itself is being
removed while handling the event.
2021-10-31 17:52:05 -04:00
Alexander Mikhaylenko
b1943e03e6 levelbar: Fill the whole space for discrete level bars
Ideally this would be using box layout, but it overrides measure() so it's
not possible - so reimplement it instead. Fix an accidentally int division
along the way.
2021-10-31 17:52:05 -04:00
Christian Hergert
63583c15db macos: fix scale on macOS 12 beta
This is a port of the fix in the quartz backend to the new macOS backend.

From the original commit:

In macOS-12.sdk CGContextConverSizeToDeviceSpace returns a negative
height and passing that to CGContextScaleCTM in turn causes the cairo
surface to draw outside the window where it can't be seen. Passing the
absolute values of the scale factors fixes the display on macOS 12 without
affecting earlier macOS versions.
2021-10-31 17:52:05 -04:00
Chun-wei Fan
0028267228 tools/generate-uac-manifest.py: Fix UAC manifest .rc
The resource compiler in the Windows 11 SDK does not allow one to include
winuser.h directly in resource scripts (.rc) with a rather cryptic error
message, so fix generating the .rc file to embed the UAC manifest by including
windows.h with WIN32_LEAN_AND_MEAN instead.
2021-10-31 17:52:05 -04:00
Chun-wei Fan
9cdc332e8a gtk: Fix version resource on for Windows 11 SDK
The rc.exe that comes with the Windows 11 SDK does not allow one to include
winuser.h directly in the .rc scripts, so make sure that it is not included
by gtk-win32.rc.body.in, but instead include windows.h with WIN32_LEAN_AND_MEAN
defined.
2021-10-31 17:52:05 -04:00
Niels De Graef
c0fc8f796b calendar: Add an explanatory comment
On the magic numbers used to get the abbreviated day names.
2021-10-31 17:52:04 -04:00
Niels De Graef
5a2f94b7ef calendar: Fix abbreviated day names
... if the current locale has a different starting day than Sunday.

This needed 2 fixes:
* We need to take into account `calendar->week_start` when
  creating/adding the appropriate `day_name_labels` field
* we were only calculating `calendar->week_start` _after_ attaching the
  `day_name_labels`, so it was still set to 0 (the default value).

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/4338
2021-10-31 17:52:04 -04:00
Bastien Nocera
59dd0dccbf broadway: Quiet initialisation failures
Broadway is the only GTK+ backend that throws an error on stderr for a
"display server" connection failure.

This causes problems when gtk_init_check() is used and unexpected error
output is generated such as with hotdoc, which fails when generating a
GTK plugin's documentation instead of overlooking the issue.

"Unable to init server: Could not connect: Connection refused"
2021-10-31 17:52:04 -04:00
Bastien Nocera
78d5f16bf7 broadway: Quiet initialisation failures
Broadway is the only GTK+ backend that throws an error on stderr when
failing to initialise, which causes problems when gtk_init_check() is
used and unexpected error output is generated.

This causes hotdoc to fail when generating a GTK plugin's documentation
instead of failing quietly.

"Unable to init server: Could not connect: Connection refused"
2021-10-31 17:52:04 -04:00
David Edmundson
faba065161 wayland: Mark opaque_region as dirty on hide
Otherwise if we hide and show a window we recreate a new surface,
breaking the compositor's association, but potentially not resend this
data for the new surface.
This matches what we do for input_region.
2021-10-31 17:52:04 -04:00
Matthias Clasen
19adb3b8b3 filechooserportal: Take a ref on transient-for
This may fix a crash that has been reported in
file_chooser_portal_data_free.

Fixes: #4314
2021-10-31 17:52:04 -04:00
Matthias Clasen
4c9c180e27 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.
2021-10-31 17:52:04 -04:00
Pierre Ossman
41a662ad2a 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.
2021-10-31 17:52:04 -04:00
Matthias Clasen
c12d398fa2 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.
2021-10-31 17:52:04 -04:00
Matthias Clasen
ca4bf8b0d1 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.
2021-10-31 17:52:04 -04:00
Matthias Clasen
16c3864e4a docs: Mention popovers in the migration guide
Things have changed around popovers, we should mention
that.
2021-10-31 17:52:04 -04:00
Matthias Clasen
1fa97e1808 entry: Clarify docs
Mention that max length is in characters.
2021-10-31 17:52:04 -04:00
Matthias Clasen
a107ebdc0d 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.
2021-10-31 17:52:04 -04:00
Matthias Clasen
161259e9ea 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.
2021-10-31 17:52:04 -04:00
Jordan Yelloz
cc5a7b153d 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
2021-10-31 17:52:04 -04:00
Martin Kühl
0476b5a34c 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
2021-10-31 17:52:04 -04:00
Lukáš Tyrychtr
4b25b43f83 Mention that after setting a button child the user is responsible for a11y relations 2021-10-31 17:52:04 -04:00
Matthias Clasen
0d94a4fcc8 resources: Treat svgs as xml
They can have their whitespace removed just the same.
2021-10-31 17:52:04 -04:00
Matthias Clasen
bcf062a578 Clean up gesture icons
These had duplicate drawing in them, and were
saved with all the extra Inkscape data.
2021-10-31 17:52:04 -04:00
Timm Bäder
252ce5a5c7 stackswitcher: Expand child buttons
Fixes #4196
2021-10-31 17:52:04 -04:00
Georges Basile Stavracas Neto
ac7bdabe95 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.
2021-10-31 17:52:04 -04:00
Georges Basile Stavracas Neto
d94ebd469e 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.
2021-10-31 17:52:04 -04:00
Matthias Clasen
de17c618fc gsk: Add a test for transform_bounds 2021-10-31 17:52:04 -04:00
James Westman
1133bff614 gtkcolorbutton: Fix documentation 2021-10-31 17:52:04 -04:00
Benjamin Otte
aa07cb4f64 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.
2021-10-31 17:52:04 -04:00
muradm
f99b35162c 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.
2021-10-31 17:52:04 -04:00
Jakub Steiner
3ae2ebac67 theme: make toggled tbuttons in toolbars visible
- do what Alex does in libadwaita

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/4264
2021-10-31 17:52:04 -04:00
Matthias Clasen
4cf9f6382f 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.
2021-10-31 17:52:04 -04:00
Matthias Clasen
9ffb3e5ece 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.
2021-10-31 17:52:04 -04:00
Lukáš Tyrychtr
72ffe46e74 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.
2021-10-31 17:52:04 -04:00
Matthias Clasen
f7b5c886b3 testsuite: Fix a few memory leaks
These are keeping the asan build in ci from passing.
2021-10-31 17:52:04 -04:00
Lukáš Tyrychtr
5b186fab1a 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
2021-10-31 17:52:04 -04:00
Alexander Mikhaylenko
d2c610148e media-controls: Make play button flat
Match the volume button.
2021-10-31 17:52:04 -04:00