gtk4.git
2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Sat, 17 Jun 2023 15:44:21 +0000 (15:44 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

Don't use "Tab list" as an accessible label

Closes #4839

See merge request GNOME/gtk!6106

2 years agoDon't use "Tab list" as an accessible label
Matthias Clasen [Fri, 16 Jun 2023 17:09:16 +0000 (13:09 -0400)]
Don't use "Tab list" as an accessible label

It does not add any extra information.

Fixes: #4839
2 years agoMerge branch 'dropdown-sections' into 'main'
Benjamin Otte [Sat, 17 Jun 2023 06:41:30 +0000 (06:41 +0000)]
Merge branch 'dropdown-sections' into 'main'

dropdown: Add section support

See merge request GNOME/gtk!6102

2 years agogtk-demo: Add an example for dropdown sections
Matthias Clasen [Sat, 17 Jun 2023 01:12:47 +0000 (21:12 -0400)]
gtk-demo: Add an example for dropdown sections

Make one of the dropdowns in the Selections
demo have sections.

2 years agodropdown: Add section support
Matthias Clasen [Sat, 17 Jun 2023 01:12:11 +0000 (21:12 -0400)]
dropdown: Add section support

Add a header-factory property and pass it through
to the listview in the popup.

2 years agoMerge branch 'fix-c4013' into 'main'
Matthias Clasen [Fri, 16 Jun 2023 16:38:22 +0000 (16:38 +0000)]
Merge branch 'fix-c4013' into 'main'

gtkprintoperation-win32.c: Fix build

See merge request GNOME/gtk!6099

2 years agoMerge branch 'a11y-computed-name' into 'main'
Matthias Clasen [Fri, 16 Jun 2023 16:30:51 +0000 (16:30 +0000)]
Merge branch 'a11y-computed-name' into 'main'

atcontext: Update name computation

See merge request GNOME/gtk!6088

2 years agoreference/gtk/coordinates: Fix typos of “widget’s”
Daniel Boles [Thu, 15 Jun 2023 16:40:08 +0000 (17:40 +0100)]
reference/gtk/coordinates: Fix typos of “widget’s”

2 years agoMerge branch 'better_gtkstacksidebar' into 'main'
Matthias Clasen [Thu, 15 Jun 2023 12:54:20 +0000 (12:54 +0000)]
Merge branch 'better_gtkstacksidebar' into 'main'

GtkStackSidebar: Explicitly mark the sidebar items as labeled by the labels

See merge request GNOME/gtk!6100

2 years agoGtkStackSidebar: Explicitly mark the sidebar items as labeled by the labels
Lukáš Tyrychtr [Thu, 15 Jun 2023 12:29:31 +0000 (14:29 +0200)]
GtkStackSidebar: Explicitly mark the sidebar items as labeled by the labels

That improves the reading of the GtkStackSidebar widget considerably.
Previously, Orca would not read the items at all, now it does.

2 years agogtkprintoperation-win32.c: Fix build
Chun-wei Fan [Thu, 15 Jun 2023 10:48:13 +0000 (18:48 +0800)]
gtkprintoperation-win32.c: Fix build

Include the needed headers so that we don't break the build with C4013
warnings, which are treated as errors if msvc_recommended_pragmas.h is
found during build configuration.

2 years agoMerge branch 'listitem' into 'main'
Benjamin Otte [Thu, 15 Jun 2023 10:10:55 +0000 (10:10 +0000)]
Merge branch 'listitem' into 'main'

signallistitemfactory: finish prototype change

See merge request GNOME/gtk!6098

2 years agoMerge branch 'no_random_screen_coords' into 'main'
Matthias Clasen [Thu, 15 Jun 2023 10:02:19 +0000 (10:02 +0000)]
Merge branch 'no_random_screen_coords' into 'main'

gtkatspicomponent: Don't return unitialized stack data as screen positions of widgets

See merge request GNOME/gtk!6097

2 years agosignallistitemfactory: finish prototype change
Marc-André Lureau [Thu, 15 Jun 2023 07:52:34 +0000 (09:52 +0200)]
signallistitemfactory: finish prototype change

Complete the API change from commit be1729b316d ("signallistitemfactory:
Update signal prototype").

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2 years agogtkatspicomponent: Don't return unitialized stack data as screen positions of widgets
Lukáš Tyrychtr [Thu, 15 Jun 2023 07:06:30 +0000 (09:06 +0200)]
gtkatspicomponent: Don't return unitialized stack data as screen positions of widgets

We can not compute the correct value, but that does not mean we should return
basically random values from an unitialized stack space.

Rather than that behavior, return zeros concistently.

2 years agoMerge branch 'wip/otte/vulkan-for-main' into 'main'
Benjamin Otte [Wed, 14 Jun 2023 06:01:47 +0000 (06:01 +0000)]
Merge branch 'wip/otte/vulkan-for-main' into 'main'

vulkan: Move some code

See merge request GNOME/gtk!6096

2 years agovulkan: Repurpose debug flags for image uploads
Benjamin Otte [Wed, 14 Jun 2023 01:31:11 +0000 (03:31 +0200)]
vulkan: Repurpose debug flags for image uploads

Now that we don't use the old environment variables anymore to force
staging buffer/image uploads, we don't need them.

However, we do autodetect the fast path for avoiding a staging buffer
now, and we might want to be able to turn that off for testing.

So add GSK_DEBUG=staging that does exactly that.

2 years agovulkan: Remove gsk_vulkan_image_new_from_data()
Benjamin Otte [Wed, 14 Jun 2023 01:26:04 +0000 (03:26 +0200)]
vulkan: Remove gsk_vulkan_image_new_from_data()

This is unused now that all the code uses map/unmap.

The only thing that map/unmap doesn't do that the old code did, was use
a staging image instead as alternative to a staging buffer for image
uploads.

However, that code is not necessary for anything, so I'm sure we can do
without.

2 years agovulkan: Add upload fastpath
Benjamin Otte [Wed, 14 Jun 2023 01:21:24 +0000 (03:21 +0200)]
vulkan: Add upload fastpath

If the memory heap that the GPU uses allows CPU access
(which is the case on basically every integrated GPU, including phones),
we can avoid a staging buffer and write directly into the image memory.

Check for this case and do that automatically.

Unfortunately we need to change the image format we use from
VK_IMAGE_TILING_OPTIMAL to VK_IMAGE_TILING_LINEAR, I haven't found a way
around that yet.

2 years agovulkan: Add gsk_vulkan_memory_can_map()
Benjamin Otte [Wed, 14 Jun 2023 00:55:32 +0000 (02:55 +0200)]
vulkan: Add gsk_vulkan_memory_can_map()

.. nd use it to assert memory is mappable when mapping it.

2 years agovulkan: Use map/unmap for fallback images
Benjamin Otte [Wed, 14 Jun 2023 00:24:20 +0000 (02:24 +0200)]
vulkan: Use map/unmap for fallback images

2 years agovulkan: Render fallback into vulkan memory
Benjamin Otte [Wed, 14 Jun 2023 00:15:29 +0000 (02:15 +0200)]
vulkan: Render fallback into vulkan memory

Use the new map/unmap image upload method for Cairo node drawing:
1. map() the memory
2. create an image surface or that memory
3. draw to that image surface
4. success

There's no longer a need for Cairo to allocate image memory.

2 years agovulkan: Use new upload method for texture uploads
Benjamin Otte [Wed, 14 Jun 2023 00:14:40 +0000 (02:14 +0200)]
vulkan: Use new upload method for texture uploads

gsk_vulkan_image_new_from_texture() now uses the direct copy via
gdk_texture_downloader_download_into().

2 years agovulkan: Add a new way to upload data into images
Benjamin Otte [Wed, 14 Jun 2023 00:08:17 +0000 (02:08 +0200)]
vulkan: Add a new way to upload data into images

As an alternative to gsk_vulkan_image_new_from_data() that
takes a given data and creates an image from it, add a 3 step process:
  gsk_vulkan_image_new_for_upload()
  gsk_vulkan_image_map_memory()
  /* put data into memory */
  gsk_vulkan_image_unmap_memory()

The benefit of this approach is that it potentially avoids a copy;
instead of creating a buffer to pass and writing the data into it before
then memcpy()ing it into the image, the data can be written straight
into image memory.

So far, only the staging buffer upload is implemented.

There are also no users, those come in the next commit(s).

2 years agovulkan: Move some code
Benjamin Otte [Tue, 13 Jun 2023 06:02:06 +0000 (08:02 +0200)]
vulkan: Move some code

Add gsk_vulkan_image_new_from_texture() and use it.

Also rewrite the actual code from using Cairo surfaces to using
GdkTextureDownloader.

2 years agovulkan: Constify upload function
Benjamin Otte [Tue, 13 Jun 2023 06:01:08 +0000 (08:01 +0200)]
vulkan: Constify upload function

2 years agoMerge branch 'wip/carlosg/pad-detection' into 'main'
Matthias Clasen [Wed, 14 Jun 2023 00:10:32 +0000 (00:10 +0000)]
Merge branch 'wip/carlosg/pad-detection' into 'main'

gdk/wayland: Create pad devices on enter

See merge request GNOME/gtk!6094

2 years agogdk: Include pads in GDK_SEAT_CAPABILITY_ALL
Carlos Garnacho [Tue, 13 Jun 2023 22:53:11 +0000 (00:53 +0200)]
gdk: Include pads in GDK_SEAT_CAPABILITY_ALL

The GDK_SEAT_CAPABILITY_TABLET_PAD stood awkwardly out of the
ALL value. Even though it's not a keyboard, its focus has more
resemblance to it, so it should be part of this group together
with keyboards.

2 years agogdk/wayland: Create pad devices on enter
Carlos Garnacho [Tue, 13 Jun 2023 22:16:58 +0000 (00:16 +0200)]
gdk/wayland: Create pad devices on enter

We were creating the pad device on wp_tablet_pad.done, but
at that time we do not know what tablet it is associated with,
thus we cannot get appropriate vid/pid/name properties for it.

To get that, we need to wait for the pad to enter a surface,
at that time we do know what tablet it is associated with, so
we can get better information about the device.

There are pads that may plausibly "change" tablet between
one .enter event and the next (e.g. Wacom Express Key Remote),
but this situation is highly unlikely. The pad devices created
are thus persistent until that situation happens.

2 years agoMerge branch 'mcatanzaro/gtk-show-uri-deprecated-for' into 'main'
Matthias Clasen [Tue, 13 Jun 2023 18:28:32 +0000 (18:28 +0000)]
Merge branch 'mcatanzaro/gtk-show-uri-deprecated-for' into 'main'

Change recommended replacement for gtk_show_uri()

See merge request GNOME/gtk!6093

2 years agoa11y docs: Some updates
Matthias Clasen [Tue, 13 Jun 2023 18:12:16 +0000 (14:12 -0400)]
a11y docs: Some updates

Clarify what UI properties go into the name computation,
and mention the inspector tools for accessiblity.

2 years agoChange recommended replacement for gtk_show_uri()
Michael Catanzaro [Tue, 13 Jun 2023 18:00:15 +0000 (13:00 -0500)]
Change recommended replacement for gtk_show_uri()

Problem is GtkFileLauncher is unable to handle all the types of URIs
that are supported by gtk_show_uri(), e.g. help: URIs. GtkUriLauncher
avoids this problem.

Another problem is that GtkUriLauncher is just generally a better choice
for launching URIs, since you don't have to create a GFile in order to
use it. Porting code is slightly simpler.

The documentation still mentions both GtkFileLauncher and GtkUriLauncher
as options, but most people will use whatever the compiler recommends
when it prints the deprecation warning.

2 years agoMerge branch 'window-clear-resize_cursor-on' into 'main'
Carlos Garnacho [Tue, 13 Jun 2023 11:39:04 +0000 (11:39 +0000)]
Merge branch 'window-clear-resize_cursor-on' into 'main'

window: Clear resize_cursor on leave notify events

See merge request GNOME/gtk!6090

2 years agowindow: Clear resize_cursor on leave notify events
Michel Dänzer [Mon, 12 Jun 2023 16:28:29 +0000 (18:28 +0200)]
window: Clear resize_cursor on leave notify events

When the pointer leaves the window surface, gtk_window_capture_motion
will not be called anymore, so priv->resize_cursor may remain non-NULL
indefinitely without this.

If update_cursor is later called (via gtk_window_maybe_update_cursor) on
a virtual enter notify event (e.g. because the pointer entered a
descendant surface), it would previously re-set the window surface
cursor to priv->resize_cursor, which could result in the wrong cursor
shape being shown for descendant surfaces.

This affected mutter-x11-frames, see
https://gitlab.freedesktop.org/xorg/xserver/-/issues/1557.

One could also say that if the pointer leaves the window surface, it's
trivially not over any window edge.

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Mon, 12 Jun 2023 19:18:49 +0000 (19:18 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

Matthiasc/for main

See merge request GNOME/gtk!6091

2 years agoci: Collect artifacts from the asan build
Matthias Clasen [Mon, 12 Jun 2023 17:00:16 +0000 (13:00 -0400)]
ci: Collect artifacts from the asan build

2 years agolistitemmanager: Quiet a compiler warning
Matthias Clasen [Mon, 12 Jun 2023 16:46:34 +0000 (12:46 -0400)]
listitemmanager: Quiet a compiler warning

2 years agoMerge branch 'a11y-overlay' into 'main'
Matthias Clasen [Mon, 12 Jun 2023 17:56:26 +0000 (17:56 +0000)]
Merge branch 'a11y-overlay' into 'main'

inspector: Add an a11y overlay

Closes #5883

See merge request GNOME/gtk!6085

2 years agoFix a crash in gtk-demo
Matthias Clasen [Mon, 12 Jun 2023 16:12:29 +0000 (12:12 -0400)]
Fix a crash in gtk-demo

Fixes #5889

2 years agodocs/reference/gtk/running: Incl GDK_DEBUG=portals
Daniel Boles [Mon, 12 Jun 2023 15:29:52 +0000 (16:29 +0100)]
docs/reference/gtk/running: Incl GDK_DEBUG=portals

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5871

2 years agoMerge branch 'focus-modal-windows' into 'main'
Luca Bacci [Mon, 12 Jun 2023 13:55:45 +0000 (13:55 +0000)]
Merge branch 'focus-modal-windows' into 'main'

win32: Focus modal windows when clicking on unfocused parent

See merge request GNOME/gtk!6051

2 years agoMerge branch 'center-dialogs' into 'main'
Luca Bacci [Mon, 12 Jun 2023 13:53:00 +0000 (13:53 +0000)]
Merge branch 'center-dialogs' into 'main'

win32: Center newly created transient windows

Closes #5407

See merge request GNOME/gtk!6050

2 years agoUpdate Czech translation
Daniel Rusek [Mon, 12 Jun 2023 13:14:31 +0000 (13:14 +0000)]
Update Czech translation

2 years agoinspector: Add an a11y overlay
Matthias Clasen [Fri, 9 Jun 2023 20:51:10 +0000 (16:51 -0400)]
inspector: Add an a11y overlay

Add an overlay that shows a11y issues.

For now, this checks for:
 - abstract roles being used
 - elements without labels
 - required attributes
 - required context

2 years agomenubutton: Horizontally expand child
Alice Mikhaylenko [Sat, 10 Jun 2023 20:02:15 +0000 (00:02 +0400)]
menubutton: Horizontally expand child

Set hexpand on the outer box so we don't propagate that expand.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5883

2 years agomenubutton: Normalize label layout
Alice Mikhaylenko [Sat, 10 Jun 2023 20:01:19 +0000 (00:01 +0400)]
menubutton: Normalize label layout

- Remove unnecessary halign=center and hexpand=0 dance
- Set hexpand=false on the outer box so we don't propagate hexpand

2 years agoMerge branch 'misc-a11y-fixes' into 'main'
Matthias Clasen [Mon, 12 Jun 2023 01:48:04 +0000 (01:48 +0000)]
Merge branch 'misc-a11y-fixes' into 'main'

Various a11y improvements

See merge request GNOME/gtk!6089

2 years agogtk4-demo: Some a11y improvements
Matthias Clasen [Sun, 11 Jun 2023 11:04:56 +0000 (07:04 -0400)]
gtk4-demo: Some a11y improvements

Add some labels in the pickers demo.

2 years agofilechooser: Some accessibility improvements
Matthias Clasen [Mon, 12 Jun 2023 00:19:24 +0000 (20:19 -0400)]
filechooser: Some accessibility improvements

2 years agotogglebutton: Set a11y properties on realize
Matthias Clasen [Sun, 11 Jun 2023 23:28:16 +0000 (19:28 -0400)]
togglebutton: Set a11y properties on realize

The pressed property is required, so we need to
make sure that it is set.

2 years agofontchooser: Add one more accessible property
Matthias Clasen [Sun, 11 Jun 2023 16:39:08 +0000 (12:39 -0400)]
fontchooser: Add one more accessible property

2 years agoaboutdialog: Set some accessible properties
Matthias Clasen [Sun, 11 Jun 2023 16:38:42 +0000 (12:38 -0400)]
aboutdialog: Set some accessible properties

2 years agomenubutton: Set accessible relations
Matthias Clasen [Sun, 11 Jun 2023 16:38:06 +0000 (12:38 -0400)]
menubutton: Set accessible relations

In the case where we create the popover, mark it
as labelled by the button.

2 years agoshortcutswindow: Add some accessible properties
Matthias Clasen [Sun, 11 Jun 2023 16:37:52 +0000 (12:37 -0400)]
shortcutswindow: Add some accessible properties

2 years agopasswordentry: Change an accessible role
Matthias Clasen [Sun, 11 Jun 2023 16:37:06 +0000 (12:37 -0400)]
passwordentry: Change an accessible role

The caps-lock icon is really an alert. Maybe
this is in vain, since orca ignores these images.

2 years agoatcontext: Change the way we handle fallback
Matthias Clasen [Sun, 11 Jun 2023 23:27:18 +0000 (19:27 -0400)]
atcontext: Change the way we handle fallback

The tooltip text should only be considered after
all other means are exhausted. but it can be used
for both the name and the description.

See https://www.w3.org/TR/accname-1.2/

2 years agoatcontext: Update name computation
Matthias Clasen [Sun, 11 Jun 2023 12:06:14 +0000 (08:06 -0400)]
atcontext: Update name computation

Implement this sentence from the "Accessible Name
and Description Computation 1.2" spec:

    If the root node's role prohibits naming,
    return the empty string ("").

See https://www.w3.org/TR/accname-1.2/

2 years agoMerge branch 'wip/alice/menu-button' into 'main'
Matthias Clasen [Sun, 11 Jun 2023 15:14:02 +0000 (15:14 +0000)]
Merge branch 'wip/alice/menu-button' into 'main'

menubutton: Horizontally expand child

Closes #5883

See merge request GNOME/gtk!6084

2 years agoMerge branch 'master' into 'main'
Matthias Clasen [Sun, 11 Jun 2023 11:12:52 +0000 (11:12 +0000)]
Merge branch 'master' into 'main'

Reset chars_changed_stamp in _gtk_text_btree_unref

Closes #5544

See merge request GNOME/gtk!6087

2 years agoPopover: If can't get widget rect, zero output ptr
Daniel Boles [Sun, 11 Jun 2023 10:46:36 +0000 (11:46 +0100)]
Popover: If can't get widget rect, zero output ptr

cherry-pick of commit a6d40b610be6acb635d8732c11bb6d866bf2e95d

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/893#note_1766079

2 years agoReset chars_changed_stamp in _gtk_text_btree_unref
Bart Jacobs [Sun, 11 Jun 2023 08:57:41 +0000 (08:57 +0000)]
Reset chars_changed_stamp in _gtk_text_btree_unref

This causes an "Invalid text buffer iterator" warning to be produced if a TextIter is used after the TextBuffer is disposed.

2 years agoMerge branch 'wip/otte/for-main' into 'main'
Benjamin Otte [Sun, 11 Jun 2023 02:19:13 +0000 (02:19 +0000)]
Merge branch 'wip/otte/for-main' into 'main'

mediafile: Load extension at startup with GTK_MEDIA

See merge request GNOME/gtk!6086

2 years agovulkan: Handle new nodes being added correctly
Benjamin Otte [Sun, 11 Jun 2023 01:09:09 +0000 (03:09 +0200)]
vulkan: Handle new nodes being added correctly

When nodes are added, nothing was warning us that we need to bump
N_RENDER_NODES.

Make sure that that's no longer necessary by refactoring the code to
remove the define.

2 years agovulkan: Do intersection check for every node
Benjamin Otte [Sun, 11 Jun 2023 01:01:04 +0000 (03:01 +0200)]
vulkan: Do intersection check for every node

This is more expensive, but it finds more cases, and in particular it
catches corner cases like empty nodes or fully clipped nodes that might
otherwise make the kernel throw signals in our direction.

2 years agovulkan: Handle empty rects in intersects_rect()
Benjamin Otte [Sun, 11 Jun 2023 00:56:50 +0000 (02:56 +0200)]
vulkan: Handle empty rects in intersects_rect()

Apart from the none case, this was already handled, so we just check if
the rect is empty now.

2 years agomediafile: Load extension at startup with GTK_MEDIA
Benjamin Otte [Sat, 26 Dec 2020 13:55:41 +0000 (14:55 +0100)]
mediafile: Load extension at startup with GTK_MEDIA

When the GTK_MEDIA env var is set, check at startup that it works, not
only when the first MediaFile is instantiated.

This has the fortunate side effect that it prints help output for
GTK_MEDIA=help at startup, too.

2 years agoMerge branch 'fontchooser-a11y' into 'main'
Matthias Clasen [Sat, 10 Jun 2023 20:29:45 +0000 (20:29 +0000)]
Merge branch 'fontchooser-a11y' into 'main'

button: Improve accessible setup

See merge request GNOME/gtk!6081

2 years agomenubutton: Horizontally expand child
Alice Mikhaylenko [Sat, 10 Jun 2023 20:02:15 +0000 (00:02 +0400)]
menubutton: Horizontally expand child

Set hexpand on the outer box so we don't propagate that expand.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5883

2 years agomenubutton: Normalize label layout
Alice Mikhaylenko [Sat, 10 Jun 2023 20:01:19 +0000 (00:01 +0400)]
menubutton: Normalize label layout

- Remove unnecessary halign=center and hexpand=0 dance
- Set hexpand=false on the outer box so we don't propagate hexpand

2 years agoMerge branch 'wip/otte/for-main' into 'main'
Benjamin Otte [Sat, 10 Jun 2023 18:51:05 +0000 (18:51 +0000)]
Merge branch 'wip/otte/for-main' into 'main'

testsuite: Add another test to the listitemmanager

See merge request GNOME/gtk!6083

2 years agolistitemmanager: All sections without widgets are unmatched
Benjamin Otte [Sat, 10 Jun 2023 18:20:51 +0000 (20:20 +0200)]
listitemmanager: All sections without widgets are unmatched

We were failing to mark sections when both the start and end of the
untracked area fell on a section boundary.

Fixes testsuite failure in
https://gitlab.gnome.org/GNOME/gtk/-/jobs/2878290

2 years agotestsuite: Print update after changes, not before
Benjamin Otte [Sat, 10 Jun 2023 18:20:10 +0000 (20:20 +0200)]
testsuite: Print update after changes, not before

This way, we don't do an empty print at the start and don't miss a print
at the end.

2 years agotestsuite: Check that removing listitem trackers works properly
Benjamin Otte [Sat, 10 Jun 2023 18:19:19 +0000 (20:19 +0200)]
testsuite: Check that removing listitem trackers works properly

We remove them at the end, so just to be sure, check again.

(Guess if I added this check because removing failed.)

2 years agotestsuite: Add another test to the listitemmanager
Benjamin Otte [Sat, 10 Jun 2023 18:12:11 +0000 (20:12 +0200)]
testsuite: Add another test to the listitemmanager

Ensure the itemmanager doesn't lose any widgets by ensuring that the
tiles with widgets do account for all children of the list widget.

2 years agocolorchooser: Improve accessibility
Matthias Clasen [Sat, 10 Jun 2023 17:59:32 +0000 (13:59 -0400)]
colorchooser: Improve accessibility

Set up missing accessible relations, labels and roles.

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Sat, 10 Jun 2023 16:15:20 +0000 (16:15 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

inspector: Fix an oversight

See merge request GNOME/gtk!6082

2 years agofontchooser: Improve accessibility
Matthias Clasen [Sat, 10 Jun 2023 15:00:35 +0000 (11:00 -0400)]
fontchooser: Improve accessibility

Set up missing accessible relations, labels and roles.

2 years agobutton: Improve accessible setup
Matthias Clasen [Sat, 10 Jun 2023 14:25:02 +0000 (10:25 -0400)]
button: Improve accessible setup

With the current approach, we get duplicate labels
in the accessible name: _Cancel Cancel. Change things
around to always set the labelled-by accessible relation
if we have a label, and not the label accessible property.

2 years agoinspector: Fix an oversight
Matthias Clasen [Sat, 10 Jun 2023 14:26:25 +0000 (10:26 -0400)]
inspector: Fix an oversight

There is no margin property, so don't set it.

2 years agoMerge branch 'textview-ctrl-backspace' into 'main'
Matthias Clasen [Sat, 10 Jun 2023 13:33:10 +0000 (13:33 +0000)]
Merge branch 'textview-ctrl-backspace' into 'main'

textview: Improve word navigation

Closes #737

See merge request GNOME/gtk!6080

2 years agotextview: Improve word navigation
Matthias Clasen [Sat, 10 Jun 2023 13:03:10 +0000 (09:03 -0400)]
textview: Improve word navigation

Both Ctrl-Left and Ctrl-Backspace were failing
to step over a non-word at the beginning of
the line. Fix this to match GtkEntry behavior.

Fixes: #737
2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Sat, 10 Jun 2023 11:03:02 +0000 (11:03 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

gtk-demo: Change sidebar tab behavior

Closes #3543

See merge request GNOME/gtk!6079

2 years agogtk-demo: Change sidebar tab behavior
Matthias Clasen [Sat, 10 Jun 2023 04:02:29 +0000 (00:02 -0400)]
gtk-demo: Change sidebar tab behavior

Change the sidebar to use the 'item' tab
behavior.

Fixes: #3543
2 years agotestsuite: More memleak fixes
Matthias Clasen [Sat, 10 Jun 2023 03:14:03 +0000 (23:14 -0400)]
testsuite: More memleak fixes

2 years agobuilder: Cosmetics
Matthias Clasen [Sat, 10 Jun 2023 03:13:26 +0000 (23:13 -0400)]
builder: Cosmetics

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Sat, 10 Jun 2023 03:17:14 +0000 (03:17 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

inspector: Cosmetics

See merge request GNOME/gtk!6078

2 years agogtk: Plug a memory leak
Matthias Clasen [Sat, 10 Jun 2023 02:30:01 +0000 (22:30 -0400)]
gtk: Plug a memory leak

2 years agogsk: Fully free mask nodes
Matthias Clasen [Sat, 10 Jun 2023 02:23:06 +0000 (22:23 -0400)]
gsk: Fully free mask nodes

We were forgetting to chain up in finalize.  Oops

2 years agogsk: Plug a memory leak
Matthias Clasen [Sat, 10 Jun 2023 01:54:16 +0000 (21:54 -0400)]
gsk: Plug a memory leak

2 years agotestsuite: Plug some memory leaks
Matthias Clasen [Fri, 9 Jun 2023 14:59:47 +0000 (10:59 -0400)]
testsuite: Plug some memory leaks

2 years agoinspector: Show computed values in a11y tab
Matthias Clasen [Sat, 10 Jun 2023 01:03:54 +0000 (21:03 -0400)]
inspector: Show computed values in a11y tab

Show the name and description in the a11y tab.
These are not direct property values, but computed
according to ARIA rules.

2 years agoinspector: Cosmetics
Matthias Clasen [Fri, 9 Jun 2023 20:39:42 +0000 (16:39 -0400)]
inspector: Cosmetics

Don't use technobabble like "fps overlay" in the UI.

2 years agoMerge branch 'filechooser-sort-directories-first' into 'main'
Matthias Clasen [Fri, 9 Jun 2023 19:10:58 +0000 (19:10 +0000)]
Merge branch 'filechooser-sort-directories-first' into 'main'

FileChooser: Sort directories before files by default

See merge request GNOME/gtk!4284

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Fri, 9 Jun 2023 14:18:51 +0000 (14:18 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

Avoid deprecation warnings from GTK_ALIGN_BASELINE_FILL

Closes #5875

See merge request GNOME/gtk!6077

2 years agoFix some typos in gtk.supp
Matthias Clasen [Fri, 9 Jun 2023 12:28:36 +0000 (08:28 -0400)]
Fix some typos in gtk.supp

Actually ignore the media module leak.

2 years agoprint: Drop one use of private api
Matthias Clasen [Fri, 9 Jun 2023 12:23:09 +0000 (08:23 -0400)]
print: Drop one use of private api

We added public api for the foreground color
for just this case, so use it.

2 years agogdk: Fix an oversight in GdkContentFormats
Matthias Clasen [Fri, 9 Jun 2023 12:12:56 +0000 (08:12 -0400)]
gdk: Fix an oversight in GdkContentFormats

When clearing a builder, reset the counts to 0.

Otherwise valgrind spots uninitialized memory
use in our testsuite.

2 years agoAvoid deprecation warnings from GTK_ALIGN_BASELINE_FILL
Matthias Clasen [Fri, 9 Jun 2023 10:39:02 +0000 (06:39 -0400)]
Avoid deprecation warnings from GTK_ALIGN_BASELINE_FILL

We have to be careful to only use GDK_ALIGN_BASELINE_FILL when
permitted by GDK_VERSION_MAX_ALLOWED because gtkenums.h is a
public header.

Fixes: #5875
I don't think we can avoid conditional compilation here, because the old definition is going to cause deprecated declaration warnings unless you define an old GDK_VERSION_MIN_REQUIRED.

2 years agoDrawingArea: Document Widget.get_color, !StyleCont
Daniel Boles [Fri, 9 Jun 2023 12:02:40 +0000 (13:02 +0100)]
DrawingArea: Document Widget.get_color, !StyleCont

StyleContext is deprecated. To just get foreground colour we now have a
method on Widget, so use that in this example, instead of StyleContext.

2 years agoUpdate POTFILES.in and POTFILES.skip
Piotr Drąg [Fri, 9 Jun 2023 11:22:17 +0000 (13:22 +0200)]
Update POTFILES.in and POTFILES.skip