The normal way to associate accels with actions is
to attach a shortcut controller to the widget. The shorcut
controller will inject the accel into the action muxer
tree, so that it can get displayed in widgets that activate
the action (say, in menus.
This approach does not works for generated menus, since the
widgets are not in the hands of the app developer, so attaching
shortcut controllers to them is impractical.
Instead, GtkModelButton has an accel property that gets
bound to the accel coming from the action muxer tree (most
likely put there via gtk_application_set_accel_for_action),
and creates a shortcut controller itself.
The change in this commit is to prevent the shortcut controller
from injecting the accel into the action muxer tree in this case.
Otherwise, the accels get 'stuck' and we won't update them if the
global accels are later changed.
This is a hack, and needs a better solution.
We were pretty aggressive about not registering
observers further than necessary, stopping at the
first muxer that provides an action.
But even though action changes further up in the tree
won't be relevant in that case, we need to listen to
accel changes, since they may come from higher up
in the tree (e.g. when using
gtk_application_set_accels_for_action with an action
that is defined on a widget.
So, register all the way to the top, and stop propagating
action changes when we hit a muxer that provides the action.
In some cases (such as when getting a new parent), the
action muxer doesn't know exactly which detailed actions
have changed accels, so we call primary_accel_changed with
just an action name.
Make the menu tracker item handle that case by matching
either against the detailed name or the the action name.
We were not handling the case right in which we
want to use underlines, but not use markup. Since
we are now using pango_parse_markup for this case,
we need to escape the xml markup.
Fixes: #4041
This reverts commit 95747b1a40.
This was wrong - it turns out that while GtkProgressBar
allows you to change its orientation, its box layout is
always vertical.
Fixes: #4037
Some bindings can't handle the coexistence of
GtkMediaStream:prepared and gtk_media_stream_prepared.
Help them out by renaming the function to
gtk_media_stream_set_prepared, and rename
gtk_media_stream_unprepared as well, to match.
The existing entry points still exist, deprecated.
Update all internal uses.
Fixes: #4023
Claim the gesture when we are activating a list item.
Otherwise we end up with double activations in
columnviews: first GtkColumnViewCell handles
the event, and then GtkListItemWidget handles
it again.
Fixes: #4015
If we have a GAction as model, we just have to let
the action helper handle the state updates. GtkButton
already calls gtk_action_helper_activate() for us.