Is it possible to define actions in blueprint or builder xml?

so i’m testing some stuff in workbench, because i wanted to try closing a bug in gnome-builder, and i need actions

is it possible to do this? if i try to just add a Gio.PropertyAction as a child of a widget in blueprint, i get re.sonny.Workbench-WARNING **: Invalid object type 'PropertyAction', and no action, it seems

I think you can specify signal handler callback name and action name (if the object supports actions) in builder XML.

what is the tag to specify it?

Some sample entries from the .ui files in gnome-software/src dir.

<signal name="row-activated" handler="gs_installed_page_app_row_activated_cb"/>
<signal name="clicked" handler="_button_update_all_clicked_cb" swapped="yes"/>
<signal name="pressed" handler="gs_details_page_star_pressed_cb" object="GsDetailsPage" swapped="no" />
<signal name="notify::visible-child" handler="stack_notify_visible_child_cb"/>

For a more exhaustive list, you can search for "<signal" in the .ui files in the src dir.

1 Like

thank you, but these are signals, not actions

i was going to use those: Gio.SimpleAction, Gio.PropertyAction

No, it’s not possible.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.