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!
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.
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.
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.
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
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
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.
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.
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
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.