Commit Graph

9 Commits

Author SHA1 Message Date
Matthias Clasen
95e5472ade action muxer: Remove unused api 2019-06-22 22:38:14 +00:00
Matthias Clasen
d1f4068b94 Replace stateful actions by property actions
The only cases of stateful actions we've seen
so far have been boolean properties, and we
don't really want to add much state handling
API, so lets just go with property actions
for now.

Adapt the only user in GtkText.
2019-06-22 17:03:38 -04:00
Matthias Clasen
412006ad23 Add owner types for widget actions
This lets us filter out actions from parent classes
when introspecting.
2019-06-22 09:38:30 -04:00
Matthias Clasen
152eabbaba widget actions: Add an explicit state type
Make the state type part of the API for installing
stateful widget actions. That lets us introspect it.

Update all callers.
2019-06-21 22:47:40 -04:00
Matthias Clasen
ef031e1a9d Allow registering actions per-class
Add a facility to register and install actions
at class init time. The intended use for these
actions is for

a) context and other model-based menus
b) key bindings

Most of these actions are going to be stateless,
so add separate apis for the simple and stateful
cases.

We avoid creating an action group for these by
teaching the action muxer about these actions.
The action muxer also maintains the enabled
state for these actions.
2019-06-18 14:47:33 -04:00
Matthias Clasen
9b62da10e6 Give the action muxer a widget
This will be used in the future to obtain
widget class actions.
2019-06-18 06:12:50 -04:00
Matthias Clasen
9bb2d1eb5c widget: Remove gtk_widget_list_action_prefixes
This function was added just for the inspector,
and is not used there anymore. Drop it.
2019-06-15 21:40:38 -04:00
Matthias Clasen
db7f0189dd action muxer: Add some convenience api
Instead of duplicating this code in multiple places,
add an api to look up an action group for a prefixed
name, and return the unprefixed name at the same time.
2019-06-15 21:40:12 -04:00
Emmanuele Bassi
fcaa9aa22d Rename GtkActionMuxer's private header
Follow the naming policy for private headers.
2018-02-02 10:28:17 +01:00