Commit Graph

75083 Commits

Author SHA1 Message Date
Emmanuele Bassi
8eb3c55709 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
2023-02-28 23:24:57 +00:00
Christian Hergert
40d4441fd8 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
2023-02-28 15:08:20 -08:00
Benjamin Otte
471ebabd77 Merge branch 'gbsneto/filechooser-fixes' into 'main'
Fix GtkFileThumbnail thumbnail query

See merge request GNOME/gtk!5570
2023-02-28 18:04:40 +00:00
Georges Basile Stavracas Neto
d8b7c909ea 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!
2023-02-28 14:18:30 -03:00
Georges Basile Stavracas Neto
158165f769 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.
2023-02-28 13:52:12 -03:00
Georges Basile Stavracas Neto
2d90031dab filethumbnail: Cosmetics
Remove an empty newline
2023-02-28 13:50:08 -03:00
Matthias Clasen
2a862c05a1 Merge branch 'matthiasc/for-main' into 'main'
inspector: Look for icon themes in system data dirs

See merge request GNOME/gtk!5567
2023-02-28 16:35:48 +00:00
Matthias Clasen
93b6c7863b Merge branch 'main' into 'main'
Update docs/reference/gtk/getting_started.md

See merge request GNOME/gtk!5558
2023-02-28 16:23:26 +00:00
Matthias Clasen
090f45a589 Merge branch 'wip/exalm/buildable' into 'main'
builderparser: Don't exit too early on nested custom tags

See merge request GNOME/gtk!5566
2023-02-28 16:21:19 +00:00
Alexander Mikhaylenko
ca737b1411 testsuite: Add a GtkBuildable custom tag test
Just test that it doesn't error out during parsing.
2023-02-28 17:51:38 +04:00
Matthias Clasen
b2af4006ba inspector: Look for icon themes in system data dirs
For some reason, these were not included, and they should.
2023-02-28 07:18:42 -05:00
Matthias Clasen
5d3942e5fa NEWS: Updates 2023-02-28 06:53:26 -05:00
Alexander Mikhaylenko
2bcc3cfb33 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.
2023-02-28 14:46:14 +04:00
Matthias Clasen
a7a498e803 Merge branch 'alloc-needed-on-child-fix' into 'main'
widget: Reset alloc_needed_on_child before allocating children

See merge request GNOME/gtk!5564
2023-02-28 10:40:02 +00:00
Ivan Molodetskikh
75a417e337 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.
2023-02-27 21:38:42 -08:00
Matthias Clasen
dbaaa59758 Merge branch 'fix-text-undo-disabling' into 'main'
text: Fix disabling of history

Closes #5622

See merge request GNOME/gtk!5565
2023-02-28 02:39:30 +00:00
Matthias Clasen
73ba043b02 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
2023-02-27 19:43:11 -05:00
Matthias Clasen
61e4eadbce 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
2023-02-27 19:17:08 -05:00
Matthias Clasen
0db2d0bc07 Merge branch 'expose_autocomplete' into 'main'
a11y: Expose GTK_ACCESSIBLE_PROPERTY_AUTOCOMPLETE

See merge request GNOME/gtk!5563
2023-02-27 16:49:00 +00:00
Emmanuele Bassi
cd10e5dd1a Verbiage Change 2023-02-27 16:32:35 +00:00
Lukáš Tyrychtr
c57d6c5575 a11y: Expose GTK_ACCESSIBLE_PROPERTY_AUTOCOMPLETE
Previously, it was not exposed at all, now it at least somewhat is.
2023-02-27 15:27:07 +01:00
Emmanuele Bassi
73057b267e Merge branch 'expose_has_popup' into 'main'
a11y: Expose GTK_ACCESSIBLE_PROPERTY_HAS_POPUP

See merge request GNOME/gtk!5562
2023-02-27 14:20:44 +00:00
Lukáš Tyrychtr
9d4bb77263 a11y: Expose GTK_ACCESSIBLE_PROPERTY_HAS_POPUP
This property was not exposed before, not it is.
2023-02-27 14:10:11 +01:00
Emmanuele Bassi
0d6cee9763 Merge branch 'expose_multi_selectable' into 'main'
a11y: Expose GTK_ACCESSIBLE_PROPERTY_MULTI_SELECTABLE to at-spi2

See merge request GNOME/gtk!5561
2023-02-27 12:41:11 +00:00
Lukáš Tyrychtr
b33bfe26fe a11y: Expose GTK_ACCESSIBLE_PROPERTY_MULTI_SELECTABLE to at-spi2
Previously, this property was not exposed to the a11y backend, now, it is.
2023-02-27 13:24:56 +01:00
Emmanuele Bassi
0cacaa08f5 Merge branch 'expose_required' into 'main'
a11y: Expose GTK_ACCESSIBLE_PROPERTY_REQUIRED to at-spi2

See merge request GNOME/gtk!5560
2023-02-27 11:30:59 +00:00
Lukáš Tyrychtr
cbf4a546b4 a11y: Expose GTK_ACCESSIBLE_PROPERTY_REQUIRED to at-spi2
Up until now, this property was silently not exposed to assistive technologies.
2023-02-27 12:17:58 +01:00
Emmanuele Bassi
03732c1d48 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
2023-02-27 11:02:40 +00:00
Lukáš Tyrychtr
568cf21486 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.
2023-02-27 11:40:46 +01:00
Bobby Neal
f11d647aa4 Update docs/reference/gtk/getting_started.md 2023-02-26 17:04:17 +00:00
Hugo Carvalho
49feaf465d Update Portuguese translation 2023-02-26 16:20:29 +00:00
Matthias Clasen
9b0afd8bff Merge branch 'pickers-demo-dnd' into 'main'
gtk4-demo: Accept file dnd in the pickers demo

See merge request GNOME/gtk!5556
2023-02-26 13:44:30 +00:00
Matthias Clasen
495ca72232 gtk4-demo: Accept file dnd in the pickers demo
Easy to add and expected of a file picker.
2023-02-26 08:28:38 -05:00
Alexander Shopov
e6f4464a3d Update Bulgarian translation 2023-02-26 08:48:06 +00:00
Anders Jonsson
cb0e4ee2be Update Swedish translation 2023-02-25 21:57:36 +00:00
Matthias Clasen
6f7b6ad61a Merge branch 'ebassi/button-no-check' into 'main'
Remove unused code in GtkButton

See merge request GNOME/gtk!5553
2023-02-25 13:41:52 +00:00
Emmanuele Bassi
1e599c9141 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.
2023-02-24 14:38:39 +00:00
Yosef Or Boczko
4cf42eb19c Update Hebrew translation 2023-02-24 09:57:37 +00:00
Matthias Clasen
b0fc2f99ba Merge branch 'mcatanzaro/#5619' into 'main'
filesystemmodel: fix crash when file is removed

Closes #5619

See merge request GNOME/gtk!5550
2023-02-23 16:24:06 +00:00
Emmanuele Bassi
2b4dd182c1 Merge branch 'add_toggle_button_role' into 'main'
a11y: Introduce a dedicated role for toggle buttons

See merge request GNOME/gtk!5549
2023-02-23 15:22:16 +00:00
Michael Catanzaro
c141d0a70a filesystemmodel: fix crash when file is removed
In 32247bc50e 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
2023-02-23 09:20:03 -06:00
Lukáš Tyrychtr
6fa8033c7c Use the correct role for GtkToggleButton 2023-02-23 15:02:29 +01:00
Lukáš Tyrychtr
de80f503e4 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.
2023-02-23 14:22:20 +01:00
Matthias Clasen
41b67c4722 Merge branch 'matthiasc/for-main' into 'main'
gtk-demo: Fix the shortcuts-window demo

See merge request GNOME/gtk!5548
2023-02-23 01:03:41 +00:00
Matthias Clasen
1eae87621d gtk-demo: Fix the shortcuts-window demo
Presenting the shortcutswindow got lost
in fb8e52f0c9. Oops.
2023-02-22 14:57:47 -05:00
Fran Dieguez
5f502601c8 Update Galician translation 2023-02-22 17:23:21 +00:00
Sabri Ünal
04d23c5cb9 Update Turkish translation 2023-02-22 11:41:36 +00:00
Philipp Kiemle
d9b6f814ad Update German translation 2023-02-22 10:34:50 +00:00
Matthias Clasen
871c46591a Merge branch 'improve_gtknotebook_a11y' into 'main'
GtkNotebook: Improve the labels of notebook pages for a11y

See merge request GNOME/gtk!5546
2023-02-21 16:48:28 +00:00
Lukáš Tyrychtr
d906b456a8 GtkNotebook: Improve the labels of notebook pages for a11y 2023-02-21 15:29:00 +01:00