gtk4.git
2 years agoUpdate Polish translation
Piotr Drąg [Sat, 4 Mar 2023 14:59:29 +0000 (15:59 +0100)]
Update Polish translation

2 years agoUpdate Korean translation
Changwoo Ryu [Fri, 3 Mar 2023 15:36:03 +0000 (15:36 +0000)]
Update Korean translation

2 years agoMerge branch 'ebassi/accessible-transfer-full' into 'main'
Matthias Clasen [Fri, 3 Mar 2023 09:46:51 +0000 (09:46 +0000)]
Merge branch 'ebassi/accessible-transfer-full' into 'main'

Mark Accessible getters as transfer full

Closes #5615

See merge request GNOME/gtk!5586

2 years agoMark Accessible getters as transfer full
Emmanuele Bassi [Fri, 24 Feb 2023 12:10:16 +0000 (12:10 +0000)]
Mark Accessible getters as transfer full

GtkAccessible implementations in C can get away returning objects just
by shuffling pointers around, but higher level languages prefer using
full ownership transfer in virtual functions.

Fixes: #5615
2 years agoMerge branch 'expose_details_relation' into 'main'
Emmanuele Bassi [Fri, 3 Mar 2023 01:55:48 +0000 (01:55 +0000)]
Merge branch 'expose_details_relation' into 'main'

a11y: Expose GTK_ACCESSIBLE_RELATION_DETAILS to at-spi2

See merge request GNOME/gtk!5580

2 years agoMerge branch 'fix_section_role' into 'main'
Emmanuele Bassi [Fri, 3 Mar 2023 01:54:51 +0000 (01:54 +0000)]
Merge branch 'fix_section_role' into 'main'

a11y: Fix mapping of GTK_ACCESSIBLE_ROLE_PRESENTATION

See merge request GNOME/gtk!5576

2 years agoMerge branch 'ebassi/atcontext-dispose' into 'main'
Matthias Clasen [Fri, 3 Mar 2023 01:54:38 +0000 (01:54 +0000)]
Merge branch 'ebassi/atcontext-dispose' into 'main'

a11y: Clear the accessible tree in GtkATContext

See merge request GNOME/gtk!5587

2 years agoRevert "stack: clear accessible parent when removing child"
Emmanuele Bassi [Fri, 3 Mar 2023 01:39:24 +0000 (01:39 +0000)]
Revert "stack: clear accessible parent when removing child"

This reverts commit 40d4441fd85742837d85d8509dc89355d39a1cdc.

The accessible parent of the child widget in a GtkStackPage is cleared
when the GtkATContext gets disposed, so we don't need to unset it
ourselves. This also avoids a temporary vivification of the GtkATContext
during dispose.

2 years agoa11y: Clear the accessible tree in GtkATContext
Emmanuele Bassi [Fri, 3 Mar 2023 01:38:27 +0000 (01:38 +0000)]
a11y: Clear the accessible tree in GtkATContext

We acquire a reference on the accessible objects, so we need to release
it when disposing the GtkATContext.

2 years agoUpdate Hungarian translation
Balázs Úr [Fri, 3 Mar 2023 00:35:25 +0000 (00:35 +0000)]
Update Hungarian translation

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Fri, 3 Mar 2023 00:19:38 +0000 (00:19 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

impcontextsimple: Return from GTask

See merge request GNOME/gtk!5585

2 years agoimpcontextsimple: Return from GTask
Matthias Clasen [Thu, 2 Mar 2023 21:17:48 +0000 (16:17 -0500)]
impcontextsimple: Return from GTask

GLib complains about this now, so do it.

2 years agoMerge branch 'leak-fix' into 'main'
Emmanuele Bassi [Wed, 1 Mar 2023 20:41:53 +0000 (20:41 +0000)]
Merge branch 'leak-fix' into 'main'

gtkatspicontext: Fix a leak of a floating GVariant

See merge request GNOME/gtk!5583

2 years agogtkatspicontext: Fix a leak of a floating GVariant
Philip Withnall [Wed, 1 Mar 2023 19:40:56 +0000 (19:40 +0000)]
gtkatspicontext: Fix a leak of a floating GVariant

If the early return path in `emit_property_changed()` is taken, and
`value` is floating, it will be leaked. Fix that by sinking `value` on
entry to the function.

Spotted by asan:
```
Direct leak of 128 byte(s) in 2 object(s) allocated from:
    #0 0x7f44774ba6af in __interceptor_malloc (/lib64/libasan.so.8+0xba6af)
    #1 0x7f44764c941a in g_malloc ../../source/glib/glib/gmem.c:130
    #2 0x7f44764f6d8a in g_slice_alloc ../../source/glib/glib/gslice.c:252
    #3 0x7f447654655d in g_variant_alloc ../../source/glib/glib/gvariant-core.c:565
    #4 0x7f447654664c in g_variant_new_from_bytes ../../source/glib/glib/gvariant-core.c:608
    #5 0x7f4476536ed5 in g_variant_new_take_string ../../source/glib/glib/gvariant.c:1307
    #6 0x7f4475c75ada in gtk_at_spi_context_state_change ../../source/gtk4/gtk/a11y/gtkatspicontext.c:1112
    #7 0x7f44758ee194 in gtk_at_context_update ../../source/gtk4/gtk/gtkatcontext.c:694
    #8 0x7f44758dbfcf in gtk_accessible_update_property ../../source/gtk4/gtk/gtkaccessible.c:326
    #9 0x7f4475b5abe3 in gtk_widget_set_tooltip_text ../../source/gtk4/gtk/gtkwidget.c:9740
    #10 0x58439d in gs_updates_page_update_ui_state ../../source/gnome-software/src/gs-updates-page.c:302
    #11 0x5857dc in gs_updates_page_set_state ../../source/gnome-software/src/gs-updates-page.c:403
    #12 0x5879f1 in gs_updates_page_load ../../source/gnome-software/src/gs-updates-page.c:636
    #13 0x58822d in gs_updates_page_reload ../../source/gnome-software/src/gs-updates-page.c:678
    #14 0x50ff48 in gs_page_reload ../../source/gnome-software/src/gs-page.c:731
    #15 0x5491ce in gs_shell_reload_cb ../../source/gnome-software/src/gs-shell.c:830
    #16 0x7f4477363f54 in g_cclosure_marshal_VOID__VOID ../../source/glib/gobject/gmarshal.c:117
    #17 0x7f447735e0ad in g_closure_invoke ../../source/glib/gobject/gclosure.c:832
    #18 0x7f4477391f3f in signal_emit_unlocked_R ../../source/glib/gobject/gsignal.c:3802
    #19 0x7f4477390c13 in g_signal_emit_valist ../../source/glib/gobject/gsignal.c:3555
    #20 0x7f4477391324 in g_signal_emit ../../source/glib/gobject/gsignal.c:3612
    #21 0x7f447705b3c3 in gs_plugin_loader_reload_delay_cb ../../source/gnome-software/lib/gs-plugin-loader.c:1538
    #22 0x7f44764bd140 in g_timeout_dispatch ../../source/glib/glib/gmain.c:5054
    #23 0x7f44764b9eb1 in g_main_dispatch ../../source/glib/glib/gmain.c:3460
    #24 0x7f44764bb72c in g_main_context_dispatch ../../source/glib/glib/gmain.c:4200
    #25 0x7f44764bba15 in g_main_context_iterate ../../source/glib/glib/gmain.c:4276
    #26 0x7f44764bbbfa in g_main_context_iteration ../../source/glib/glib/gmain.c:4343
    #27 0x7f44769ef655 in g_application_run ../../source/glib/gio/gapplication.c:2589
    #28 0x4f2da5 in main ../../source/gnome-software/src/gs-main.c:49
    #29 0x7f4474e4a50f in __libc_start_call_main (/lib64/libc.so.6+0x2750f)
```

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2 years agoa11y: Expose GTK_ACCESSIBLE_RELATION_DETAILS to at-spi2
Lukáš Tyrychtr [Wed, 1 Mar 2023 12:53:39 +0000 (13:53 +0100)]
a11y: Expose GTK_ACCESSIBLE_RELATION_DETAILS to at-spi2

This particular relation was not exposed to at-spi2.
Exposing it required adding a missing at-spi2 relation variant, but it was introduced
in at-spi2-core 2.26, so that's likely safe as well.

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Wed, 1 Mar 2023 12:36:49 +0000 (12:36 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

inspector: Remove debug spew

See merge request GNOME/gtk!5579

2 years agoinspector: Remove debug spew
Matthias Clasen [Wed, 1 Mar 2023 11:32:52 +0000 (06:32 -0500)]
inspector: Remove debug spew

2 years agoa11y: Fix mapping of GTK_ACCESSIBLE_ROLE_PRESENTATION
Lukáš Tyrychtr [Wed, 1 Mar 2023 10:07:09 +0000 (11:07 +0100)]
a11y: Fix mapping of GTK_ACCESSIBLE_ROLE_PRESENTATION

It was, for some reason, mapped to ATSPI_ROLE_SECTION, and GTK_ACCESSIBLE_ROLE_SECTION was mapped to
ATSPI_ROLE_FILLER, so the mapping is reversed. So, reverse it and make it correct.

2 years agoMerge branch 'wip/otte/default-size-docs' into 'main'
Benjamin Otte [Wed, 1 Mar 2023 10:06:34 +0000 (10:06 +0000)]
Merge branch 'wip/otte/default-size-docs' into 'main'

window: Clarify docs for default-size

See merge request GNOME/gtk!5569

2 years agowindow: Clarify docs for default-size
Benjamin Otte [Wed, 1 Mar 2023 10:06:32 +0000 (10:06 +0000)]
window: Clarify docs for default-size

2 years agoMerge branch 'textbuffer-foreground-property' into 'main'
Matthias Clasen [Wed, 1 Mar 2023 02:46:05 +0000 (02:46 +0000)]
Merge branch 'textbuffer-foreground-property' into 'main'

textbuffer: Use correct foreground color property

See merge request GNOME/gtk!5574

2 years agotextbuffer: Use correct foreground color property
Mat [Wed, 1 Mar 2023 02:01:46 +0000 (04:01 +0200)]
textbuffer: Use correct foreground color property

The 'foreground-rgba' property should be used instead of 'foreground',
since the latter is not readable.

2 years agoMerge branch 'wip/chergert/fix-stack-page-leak' into 'main'
Emmanuele Bassi [Tue, 28 Feb 2023 23:24:57 +0000 (23:24 +0000)]
Merge branch 'wip/chergert/fix-stack-page-leak' into 'main'

stack: clear accessible parent when removing child

Closes #5626

See merge request GNOME/gtk!5571

2 years agostack: clear accessible parent when removing child
Christian Hergert [Tue, 28 Feb 2023 23:05:56 +0000 (15:05 -0800)]
stack: clear accessible parent when removing child

Without this, the GtkStackPage may not reach a reference count of zero
and therefore will be leaked.

Fixes #5626

2 years agoMerge branch 'gbsneto/filechooser-fixes' into 'main'
Benjamin Otte [Tue, 28 Feb 2023 18:04:40 +0000 (18:04 +0000)]
Merge branch 'gbsneto/filechooser-fixes' into 'main'

Fix GtkFileThumbnail thumbnail query

See merge request GNOME/gtk!5570

2 years agofilethumbnail: Set filechooser::queried after querying
Georges Basile Stavracas Neto [Tue, 28 Feb 2023 16:54:11 +0000 (13:54 -0300)]
filethumbnail: Set filechooser::queried after querying

Setting this attribute after querying, but before receiving the
results, can lead to inappropriate behaviour. This can be reproduced
by dragging the scrollbar very quickly in a large directory; after
going up and down a few times, some thumbnails will be wrong.

Without this branch, "wrong" means they'll show the completely wrong
icon or thumbnail, e.g. a folder icon in a video file. With previous
commit, "wrong" means they'll be empty even when there is a thumbnail
available.

The sequence of events that triggers this is as follows:

 1. GtkListItem receives a GFileInfo object and passes it to
    GtkFileThumbnail via expressions

 2. `get_thumbnail()` is called, doesn't find a thumbnail

 3. `filechooser::queried` is not set yet, so it is set to TRUE
      and we call `g_file_query_info_async()`

 4. **Before `thumbnail_queried_cb` is called**, a new GFileInfo
    is set, and we cancel the query initiated in the previous
    step

 5. We now have a GFileInfo with `filechooser::queried` set to
    TRUE, and no thumbnail!

This commit fixes that by only setting the `filechooser::queried`
attribute after the icon is queried. We need to set it in two
situations: when the query is successful, or when the error is
not G_IO_ERROR_CANCELLED. That's because the query was cancelled,
we didn't really perform it!

2 years agofilethumbnail: Clear image on failure
Georges Basile Stavracas Neto [Tue, 28 Feb 2023 16:52:12 +0000 (13:52 -0300)]
filethumbnail: Clear image on failure

Unset the image if we fail to find the appropriate icon, regardless
of the reason of the failure. Prevents the thumbnail to misrepresent
the GFileInfo it's supposed to represent.

2 years agofilethumbnail: Cosmetics
Georges Basile Stavracas Neto [Tue, 28 Feb 2023 16:50:08 +0000 (13:50 -0300)]
filethumbnail: Cosmetics

Remove an empty newline

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Tue, 28 Feb 2023 16:35:48 +0000 (16:35 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

inspector: Look for icon themes in system data dirs

See merge request GNOME/gtk!5567

2 years agoMerge branch 'main' into 'main'
Matthias Clasen [Tue, 28 Feb 2023 16:23:26 +0000 (16:23 +0000)]
Merge branch 'main' into 'main'

Update docs/reference/gtk/getting_started.md

See merge request GNOME/gtk!5558

2 years agoMerge branch 'wip/exalm/buildable' into 'main'
Matthias Clasen [Tue, 28 Feb 2023 16:21:19 +0000 (16:21 +0000)]
Merge branch 'wip/exalm/buildable' into 'main'

builderparser: Don't exit too early on nested custom tags

See merge request GNOME/gtk!5566

2 years agotestsuite: Add a GtkBuildable custom tag test
Alexander Mikhaylenko [Tue, 28 Feb 2023 13:51:38 +0000 (17:51 +0400)]
testsuite: Add a GtkBuildable custom tag test

Just test that it doesn't error out during parsing.

2 years agoinspector: Look for icon themes in system data dirs
Matthias Clasen [Tue, 28 Feb 2023 12:18:42 +0000 (07:18 -0500)]
inspector: Look for icon themes in system data dirs

For some reason, these were not included, and they should.

2 years agoNEWS: Updates
Matthias Clasen [Tue, 28 Feb 2023 11:53:26 +0000 (06:53 -0500)]
NEWS: Updates

2 years agobuilderparser: Don't exit too early on nested custom tags
Alexander Mikhaylenko [Tue, 28 Feb 2023 10:25:42 +0000 (14:25 +0400)]
builderparser: Don't exit too early on nested custom tags

Currently nested custom tags work only as long as the element names differ
from the root one. If it's same, for example:

<condition type="any">
  <condition type="max-width">600</condition>
  <condition type="max-height">600</condition>
</condition>

then it will fail. Meanwhile the same tags wrapped into <conditions> would
work.

The problem is that custom tag parsing is considered finished as soon as we
encounter a closing tag with the same element name. So instead, track the
nesting level.

2 years agoMerge branch 'alloc-needed-on-child-fix' into 'main'
Matthias Clasen [Tue, 28 Feb 2023 10:40:02 +0000 (10:40 +0000)]
Merge branch 'alloc-needed-on-child-fix' into 'main'

widget: Reset alloc_needed_on_child before allocating children

See merge request GNOME/gtk!5564

2 years agowidget: Reset alloc_needed_on_child before allocating children
Ivan Molodetskikh [Mon, 27 Feb 2023 22:42:16 +0000 (14:42 -0800)]
widget: Reset alloc_needed_on_child before allocating children

Reset alloc_needed_on_child *before* allocating the children. This is
because some child's size_allocate() may call queue_allocate(), which
will bubble up alloc_needed_on_child. An example of this happening is
with GtkScrollable implementations, which are supposed to configure
their adjustments in size_allocate(), which will cause GtkScrollbar's
GtkRange to notice and queue_allocate() on itself.

If we reset alloc_needed_on_child after this happens, then our children
will have a lingering alloc_needed_on_child and will not receive an
allocation.

This commit fixes widgets occasionally losing an allocation when this
scenario happens.

2 years agoMerge branch 'fix-text-undo-disabling' into 'main'
Matthias Clasen [Tue, 28 Feb 2023 02:39:30 +0000 (02:39 +0000)]
Merge branch 'fix-text-undo-disabling' into 'main'

text: Fix disabling of history

Closes #5622

See merge request GNOME/gtk!5565

2 years agotext: Make editable API irreversible
Matthias Clasen [Tue, 28 Feb 2023 00:43:11 +0000 (19:43 -0500)]
text: Make editable API irreversible

Programmatic changes to the entry contents should
not become part of the undo history.

Sadly, the editable implementations are also used
in the code paths that we use for user-initiated changes,
so we have to be careful to only set them as
irreversible if we are not already in a user action.

Fixes: #5622
2 years agotext: Fix disabling of history
Matthias Clasen [Tue, 28 Feb 2023 00:17:08 +0000 (19:17 -0500)]
text: Fix disabling of history

Keep a separate boolean for enable-undo, and
disable the history if it is false, or the entry
is not using visible text, or isn't editable.

Related to: #5622

2 years agoMerge branch 'expose_autocomplete' into 'main'
Matthias Clasen [Mon, 27 Feb 2023 16:49:00 +0000 (16:49 +0000)]
Merge branch 'expose_autocomplete' into 'main'

a11y: Expose GTK_ACCESSIBLE_PROPERTY_AUTOCOMPLETE

See merge request GNOME/gtk!5563

2 years agoVerbiage Change
Emmanuele Bassi [Mon, 27 Feb 2023 16:32:35 +0000 (16:32 +0000)]
Verbiage Change

2 years agoa11y: Expose GTK_ACCESSIBLE_PROPERTY_AUTOCOMPLETE
Lukáš Tyrychtr [Mon, 27 Feb 2023 14:10:49 +0000 (15:10 +0100)]
a11y: Expose GTK_ACCESSIBLE_PROPERTY_AUTOCOMPLETE

Previously, it was not exposed at all, now it at least somewhat is.

2 years agoMerge branch 'expose_has_popup' into 'main'
Emmanuele Bassi [Mon, 27 Feb 2023 14:20:44 +0000 (14:20 +0000)]
Merge branch 'expose_has_popup' into 'main'

a11y: Expose GTK_ACCESSIBLE_PROPERTY_HAS_POPUP

See merge request GNOME/gtk!5562

2 years agoa11y: Expose GTK_ACCESSIBLE_PROPERTY_HAS_POPUP
Lukáš Tyrychtr [Mon, 27 Feb 2023 13:10:11 +0000 (14:10 +0100)]
a11y: Expose GTK_ACCESSIBLE_PROPERTY_HAS_POPUP

This property was not exposed before, not it is.

2 years agoMerge branch 'expose_multi_selectable' into 'main'
Emmanuele Bassi [Mon, 27 Feb 2023 12:41:11 +0000 (12:41 +0000)]
Merge branch 'expose_multi_selectable' into 'main'

a11y: Expose GTK_ACCESSIBLE_PROPERTY_MULTI_SELECTABLE to at-spi2

See merge request GNOME/gtk!5561

2 years agoa11y: Expose GTK_ACCESSIBLE_PROPERTY_MULTI_SELECTABLE to at-spi2
Lukáš Tyrychtr [Mon, 27 Feb 2023 12:24:56 +0000 (13:24 +0100)]
a11y: Expose GTK_ACCESSIBLE_PROPERTY_MULTI_SELECTABLE to at-spi2

Previously, this property was not exposed to the a11y backend, now, it is.

2 years agoMerge branch 'expose_required' into 'main'
Emmanuele Bassi [Mon, 27 Feb 2023 11:30:59 +0000 (11:30 +0000)]
Merge branch 'expose_required' into 'main'

a11y: Expose GTK_ACCESSIBLE_PROPERTY_REQUIRED to at-spi2

See merge request GNOME/gtk!5560

2 years agoa11y: Expose GTK_ACCESSIBLE_PROPERTY_REQUIRED to at-spi2
Lukáš Tyrychtr [Mon, 27 Feb 2023 11:17:58 +0000 (12:17 +0100)]
a11y: Expose GTK_ACCESSIBLE_PROPERTY_REQUIRED to at-spi2

Up until now, this property was silently not exposed to assistive technologies.

2 years agoMerge branch 'fix_invalid_role_mapping' into 'main'
Emmanuele Bassi [Mon, 27 Feb 2023 11:02:40 +0000 (11:02 +0000)]
Merge branch 'fix_invalid_role_mapping' into 'main'

a11y: Map GTK_ACCESSIBLE_STATE_INVALID to ATSPI_STATE_INVALID_ENTRY

See merge request GNOME/gtk!5559

2 years agoa11y: Map GTK_ACCESSIBLE_STATE_INVALID to ATSPI_STATE_INVALID_ENTRY
Lukáš Tyrychtr [Mon, 27 Feb 2023 10:40:46 +0000 (11:40 +0100)]
a11y: Map GTK_ACCESSIBLE_STATE_INVALID to ATSPI_STATE_INVALID_ENTRY

Previously, it was mapped to ATSPI_STATE_INVALID. However, that state
is used for some internal errors, and not user errors, so use the correct
one for that purpose.

2 years agoUpdate docs/reference/gtk/getting_started.md
Bobby Neal [Sun, 26 Feb 2023 17:04:17 +0000 (17:04 +0000)]
Update docs/reference/gtk/getting_started.md

2 years agoUpdate Portuguese translation
Hugo Carvalho [Sun, 26 Feb 2023 16:20:29 +0000 (16:20 +0000)]
Update Portuguese translation

2 years agoMerge branch 'pickers-demo-dnd' into 'main'
Matthias Clasen [Sun, 26 Feb 2023 13:44:30 +0000 (13:44 +0000)]
Merge branch 'pickers-demo-dnd' into 'main'

gtk4-demo: Accept file dnd in the pickers demo

See merge request GNOME/gtk!5556

2 years agogtk4-demo: Accept file dnd in the pickers demo
Matthias Clasen [Thu, 23 Feb 2023 19:44:52 +0000 (14:44 -0500)]
gtk4-demo: Accept file dnd in the pickers demo

Easy to add and expected of a file picker.

2 years agoUpdate Bulgarian translation
Alexander Shopov [Sun, 26 Feb 2023 08:48:06 +0000 (08:48 +0000)]
Update Bulgarian translation

2 years agoUpdate Swedish translation
Anders Jonsson [Sat, 25 Feb 2023 21:57:36 +0000 (21:57 +0000)]
Update Swedish translation

2 years agoMerge branch 'ebassi/button-no-check' into 'main'
Matthias Clasen [Sat, 25 Feb 2023 13:41:52 +0000 (13:41 +0000)]
Merge branch 'ebassi/button-no-check' into 'main'

Remove unused code in GtkButton

See merge request GNOME/gtk!5553

2 years agoRemove unused code in GtkButton
Emmanuele Bassi [Fri, 24 Feb 2023 12:10:52 +0000 (12:10 +0000)]
Remove unused code in GtkButton

GtkButton still has some code checking if the instance passed to
gtk_button_set_label() is a GtkCheckButton; GtkCheckButton is not a
GtkButton any more.

2 years agoUpdate Hebrew translation
Yosef Or Boczko [Fri, 24 Feb 2023 09:57:37 +0000 (09:57 +0000)]
Update Hebrew translation

2 years agoMerge branch 'mcatanzaro/#5619' into 'main'
Matthias Clasen [Thu, 23 Feb 2023 16:24:06 +0000 (16:24 +0000)]
Merge branch 'mcatanzaro/#5619' into 'main'

filesystemmodel: fix crash when file is removed

Closes #5619

See merge request GNOME/gtk!5550

2 years agoMerge branch 'add_toggle_button_role' into 'main'
Emmanuele Bassi [Thu, 23 Feb 2023 15:22:16 +0000 (15:22 +0000)]
Merge branch 'add_toggle_button_role' into 'main'

a11y: Introduce a dedicated role for toggle buttons

See merge request GNOME/gtk!5549

2 years agofilesystemmodel: fix crash when file is removed
Michael Catanzaro [Thu, 23 Feb 2023 15:20:03 +0000 (09:20 -0600)]
filesystemmodel: fix crash when file is removed

In 32247bc50e63b709ae738a95a2ec71345b5fad75 node_get_for_file() was
changed to return GTK_INVALID_LIST_POSITION rather than 0 when the file
is untracked. Most call sites were updated accordingly, but this one was
missed.

Fixes #5619

2 years agoUse the correct role for GtkToggleButton
Lukáš Tyrychtr [Thu, 23 Feb 2023 14:02:29 +0000 (15:02 +0100)]
Use the correct role for GtkToggleButton

2 years agoa11y: Introduce a dedicated role for toggle buttons
Lukáš Tyrychtr [Thu, 23 Feb 2023 13:22:20 +0000 (14:22 +0100)]
a11y: Introduce a dedicated role for toggle buttons

Up until now, toggle buttons were presented as regular push buttons.
That's the approach used by the ARIA specification, however, our platform
accessibility backend, at-spi2, can not represent accessibe states with values,
so we can not represent the design pattern precisely enough for screen readers.
If, in future, the a11y backends gain this capability, we might consider again
removing this role.

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Thu, 23 Feb 2023 01:03:41 +0000 (01:03 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

gtk-demo: Fix the shortcuts-window demo

See merge request GNOME/gtk!5548

2 years agogtk-demo: Fix the shortcuts-window demo
Matthias Clasen [Wed, 22 Feb 2023 19:55:56 +0000 (14:55 -0500)]
gtk-demo: Fix the shortcuts-window demo

Presenting the shortcutswindow got lost
in fb8e52f0c957fa7. Oops.

2 years agoUpdate Galician translation
Fran Dieguez [Wed, 22 Feb 2023 17:23:21 +0000 (17:23 +0000)]
Update Galician translation

2 years agoUpdate Turkish translation
Sabri Ünal [Wed, 22 Feb 2023 11:41:36 +0000 (11:41 +0000)]
Update Turkish translation

2 years agoUpdate German translation
Philipp Kiemle [Wed, 22 Feb 2023 10:34:50 +0000 (10:34 +0000)]
Update German translation

2 years agoMerge branch 'improve_gtknotebook_a11y' into 'main'
Matthias Clasen [Tue, 21 Feb 2023 16:48:28 +0000 (16:48 +0000)]
Merge branch 'improve_gtknotebook_a11y' into 'main'

GtkNotebook: Improve the labels of notebook pages for a11y

See merge request GNOME/gtk!5546

2 years agoGtkNotebook: Improve the labels of notebook pages for a11y
Lukáš Tyrychtr [Tue, 21 Feb 2023 14:13:11 +0000 (15:13 +0100)]
GtkNotebook: Improve the labels of notebook pages for a11y

2 years agoUpdated Spanish translation
Daniel [Tue, 21 Feb 2023 11:07:49 +0000 (12:07 +0100)]
Updated Spanish translation

2 years agoMerge branch 'main' into 'main'
Emmanuele Bassi [Mon, 20 Feb 2023 21:30:05 +0000 (21:30 +0000)]
Merge branch 'main' into 'main'

button: Remove nullable annotation for new_from_icon_name()

Closes #5606

See merge request GNOME/gtk!5544

2 years agobutton: Remove nullable annotation for new_from_icon_name()
Philipp Hörist [Mon, 20 Feb 2023 19:32:06 +0000 (20:32 +0100)]
button: Remove nullable annotation for new_from_icon_name()

This makes it more consistent with set_icon_name() which
does also not accept NULL.

Fixes #5606

2 years agoMerge branch 'builder-tool-child-properties' into 'main'
Matthias Clasen [Mon, 20 Feb 2023 13:12:27 +0000 (13:12 +0000)]
Merge branch 'builder-tool-child-properties' into 'main'

gtk4-builder-tool: Prefer child properties

Closes #5609

See merge request GNOME/gtk!5543

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Mon, 20 Feb 2023 13:04:33 +0000 (13:04 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

filechooser: Fix paned limits

See merge request GNOME/gtk!5542

2 years agogtk4-builder-tool: Prefer child properties
Matthias Clasen [Mon, 20 Feb 2023 02:47:10 +0000 (21:47 -0500)]
gtk4-builder-tool: Prefer child properties

Rewrite <child> elements to use child properties
where that is easily possible.

Fixes: #5609
2 years agoUpdate Indonesian translation
Kukuh Syafaat [Mon, 20 Feb 2023 01:20:48 +0000 (01:20 +0000)]
Update Indonesian translation

2 years agofilechooser: Fix paned limits
Matthias Clasen [Mon, 20 Feb 2023 00:12:30 +0000 (19:12 -0500)]
filechooser: Fix paned limits

The intention of the ui file was to not let
the paned shrink both children down to nothing,
but using <child> for the children effectively
overrides the setting of the shrink properties.
Fix that by using child properties instead of
<child>.

2 years agoMerge branch 'builder-tool-template-parent' into 'main'
Matthias Clasen [Mon, 20 Feb 2023 00:05:06 +0000 (00:05 +0000)]
Merge branch 'builder-tool-template-parent' into 'main'

builder-tool: Try harder to find template parents

Closes #5232

See merge request GNOME/gtk!5541

2 years agobuilder-tool: Try harder to find template parents
Matthias Clasen [Sun, 19 Feb 2023 18:07:16 +0000 (13:07 -0500)]
builder-tool: Try harder to find template parents

This will make it work (in some cases) to add extra
libraries via LD_PRELOAD.

Based on work by Julian Sparber,
https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/5084

Fixes: #5232
2 years agoUpdate Basque translation
Asier Sarasua Garmendia [Sun, 19 Feb 2023 20:44:24 +0000 (20:44 +0000)]
Update Basque translation

2 years agoUpdate Ukrainian translation
Yuri Chornoivan [Sun, 19 Feb 2023 20:23:35 +0000 (20:23 +0000)]
Update Ukrainian translation

2 years agoUpdate Lithuanian translation
Aurimas Černius [Sun, 19 Feb 2023 19:06:03 +0000 (19:06 +0000)]
Update Lithuanian translation

2 years agoMerge branch 'texturescalenode-type-annotations' into 'main'
Emmanuele Bassi [Sun, 19 Feb 2023 17:18:01 +0000 (17:18 +0000)]
Merge branch 'texturescalenode-type-annotations' into 'main'

Fix self-`(type)` annotations for `TextureScaleNode` methods

See merge request GNOME/gtk!5539

2 years agoFix self-`(type)` annotations for `TextureScaleNode` methods
Sebastian Dröge [Sun, 19 Feb 2023 17:00:34 +0000 (19:00 +0200)]
Fix self-`(type)` annotations for `TextureScaleNode` methods

2 years agoMerge branch 'fix_custom_accessible_hierarchy' into 'main'
Matthias Clasen [Sun, 19 Feb 2023 16:15:49 +0000 (16:15 +0000)]
Merge branch 'fix_custom_accessible_hierarchy' into 'main'

Allow setting accessible parent and next sibling

See merge request GNOME/gtk!5517

2 years agoFix the build
Matthias Clasen [Sun, 19 Feb 2023 15:26:27 +0000 (15:26 +0000)]
Fix the build

2 years agoMiscellaneous formatting and documentation fixes
Matthias Clasen [Sun, 19 Feb 2023 15:09:25 +0000 (15:09 +0000)]
Miscellaneous formatting and documentation fixes

2 years agoMerge branch 'missing-since-markers' into 'main'
Matthias Clasen [Sun, 19 Feb 2023 14:56:51 +0000 (14:56 +0000)]
Merge branch 'missing-since-markers' into 'main'

Add two missing `Since` markers

See merge request GNOME/gtk!5537

2 years agoAdd two missing `Since` markers
Sebastian Dröge [Sun, 19 Feb 2023 09:18:15 +0000 (11:18 +0200)]
Add two missing `Since` markers

2 years agoUpdate Georgian translation
Ekaterine Papava [Sun, 19 Feb 2023 05:48:04 +0000 (05:48 +0000)]
Update Georgian translation

2 years agoMerge branch 'wip/otte/for-main' into 'main'
Benjamin Otte [Sun, 19 Feb 2023 05:33:59 +0000 (05:33 +0000)]
Merge branch 'wip/otte/for-main' into 'main'

listview: Measure children only, not self

See merge request GNOME/gtk!5535

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Sun, 19 Feb 2023 05:01:53 +0000 (05:01 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

Drop some unnecessary includes

See merge request GNOME/gtk!5536

2 years agoDrop some unnecessary includes
Matthias Clasen [Sun, 19 Feb 2023 03:54:45 +0000 (22:54 -0500)]
Drop some unnecessary includes

2 years agolistview: Measure children only, not self
Benjamin Otte [Sun, 19 Feb 2023 03:55:33 +0000 (04:55 +0100)]
listview: Measure children only, not self

The previous code would include CSS padding/margin/border in the
measurement and that is wrong.

Until commit a96c75ff02 this was not actually visible, but afterwards
listitems were allocated 16px too wide.

Test included

2 years agoRevert "Merge branch 'inscription-single-line' into 'main'"
Matthias Clasen [Sun, 19 Feb 2023 00:00:10 +0000 (19:00 -0500)]
Revert "Merge branch 'inscription-single-line' into 'main'"

This reverts commit 7ec90abf2473a3ba0fd9d0f0eda8b2f3f9b2f915, reversing
changes made to ec49a912aa855eb8064a4bbaf7a2d311c4cdf83a.

We did not have agreement on this after all.

2 years agoMerge branch 'inscription-single-line' into 'main'
Matthias Clasen [Sat, 18 Feb 2023 23:34:17 +0000 (23:34 +0000)]
Merge branch 'inscription-single-line' into 'main'

inscription: Add single-line-mode property

Closes #5444

See merge request GNOME/gtk!5504

2 years agoMerge branch 'wip/carlosg/dnd-x11-keys' into 'main'
Matthias Clasen [Sat, 18 Feb 2023 22:20:30 +0000 (22:20 +0000)]
Merge branch 'wip/carlosg/dnd-x11-keys' into 'main'

gdk/x11: Also grab keyboard during XDnD grabs

Closes #5604

See merge request GNOME/gtk!5533