Is there a way to set tooltip text or label for action?

In my app, enum all action via SimpleActionGroup.list_actions, then show them and set a shortcut for them, its data is too simple, is there a way to set tooltip text or label for action?

var pref_group = new Hdy.PreferencesGroup();
pref_group.title = action_group.title;
pref_group.description = action_group.description;

foreach (var action in {
    full_action = "%s.%s".printf(, action);
    accel_array = KApplication.singleton.get_accels_for_action(full_action);
    if (1 < accel_array.length) {
        expand_row = new Hdy.ExpanderRow();
        expand_row.title = full_action;
        expand_row.expanded = true;
        for (int i = 0; i < accel_array.length; i++) {
            accelerator = accel_array[i];
            expand_row.add(this.build_shortcut_row(full_action, accelerator));
    } else {
        accelerator = (0 < accel_array.length) ? accel_array[0] : "";
        pref_group.add(this.build_shortcut_row(full_action, accelerator));



It’s better if GAction has a member to get activated object.

No, there isn’t.

GAction/GMenu separates the presentation data from the action implementation.

GAction is just the action part.

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