If the operation mode is OPERATION_MODE_RECENT and we end up in the
'goto file_entry' case, we don't set info.result. Then later after
calling check_save_entry, is_empty is TRUE which causes a goto out and
here we then try to use info.result, which is uninitialized.
Initialize info.result before doing all this.
Found by scan-build
If error is NULL, replacing the file contents worked and we don't
show the error dialog. The previous version pretty explicitly
dereferenced a NULL pointer by first ensuring that error is NULL and
then accessing error->message.
Found by scan-build
Unparent the child widget before tearing down its
stack page. This is necessary so a11y can still access
the stack page accessible to emit change notification
when it learns that the child is removed.
Since we mention abstract roles in the documentation
for GtkAccessibleRole, we should say what roles are
abstract. Doing this shows that we actually use two
abstract roles heavily, ourselves: WIDGET and WINDOW.
GtkModelButton is no longer derived from GtkButton,
but can still treat it like a button for the purposes
of having a click action. This lets ATs activate
menu items again.
When the button role changes, we want to update the
accessible role to match. Since accessible roles are
unchangeable post-creation of the AT context, we have
to cheat a bit and recreate the whole context.
Set the accessible role to GTK_ACCESSIBLE_ROLE_MENU_ITEM.
This is incomplete, we need to recreate the context when
the buttons role changes, and there are other things that
need to be set.
Some people read the "Getting Started" section as a series of
incremental lessons, and having the examples go from GtkApplication to
the old style "init / spin the main loop" confuses them.
We should be using GtkApplication everywhere in our examples.
According to section 7.1 of WAI-ARIA, the progressbar role
has the "Children presentational" characteristic, which
indicates that children should not be represented in
the a11y tree.
According to section 7.1 of WAI-ARIA, the meter role
has the "Children presentational" characteristic, which
indicates that children should not be represented in
the a11y tree.
According to section 7.1 of WAI-ARIA, the switch role
has the "Children presentational" characteristic, which
indicates that children should not be represented in
the a11y tree.
According to section 7.1 of WAI-ARIA, the slider role
has the "Children presentational" characteristic, which
indicates that children should not be represented in
the a11y tree, which makes sense, since these are all
just internal gizmos.
Recompute the layout when the css style change
affects text attributes. This matches what we do
in GtkLabel, and without this, changing the
font-features-setting css property in the Inspector
does not have immediate effect.
The last event, matching lifting the finger/releasing the mouse button,
is important when there's a large delay between it and the previous events,
as in when performing a movement, stopping, then releasing fingers as
opposed to doing a swipe.
If this event is skipped, doing this will result in kinetic deceleration
matching the previous finger movement, while the expected behavior would
be no deceleration.
See also 5dc6194b98 for a similar fix in
GtkEventControllerScroll.
GtkAtSpiRoot is not a context, which means it needs to emit
ChildrenChanged events by itself whenever a toplevel is added to, or
removed from, the list of toplevels.
A bit hacky: we skip parsing values that have a reference or
reference-list type, but we do not error out. Instead, we return a NULL
value, which we catch in the GtkBuildable interface implementation to
get the actual object, and construct a reference list value.
There's still some ickyness around the value type that can only be
solved by having an attribute and role taxonomy.