unity-gtk-action-group

unity-gtk-action-group — Action group collector

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── UnityGtkActionGroup

Implemented Interfaces

UnityGtkActionGroup implements GActionGroup.

Includes

#include <unity-gtk-parser.h>

Description

A UnityGtkActionGroup is a GActionGroup that accumulates the actions of multiple UnityGtkMenuShells into a single object. This can be used for purposes such as exporting actions over DBus with g_dbus_connection_export_action_group().

Functions

unity_gtk_action_group_new ()

UnityGtkActionGroup *
unity_gtk_action_group_new (GActionGroup *old_group);

Creates a new UnityGtkMenuShell based on the contents of the given menu_shell . Any subsequent changes to menu_shell are reflected in the returned UnityGtkMenuShell.

Actions not found in an attached UnityGtkMenuShell are queried in old_group before failing.

Parameters

old_group

a fallback GActionGroup.

 

Returns

a new UnityGtkActionGroup.


unity_gtk_action_group_connect_shell ()

void
unity_gtk_action_group_connect_shell (UnityGtkActionGroup *group,
                                      UnityGtkMenuShell *shell);

Creates actions for all menu items in shell and adds them to group . Subsequent changes to shell also affect group .

Parameters

group

a UnityGtkActionGroup.

 

shell

a UnityGtkMenuShell.

 

unity_gtk_action_group_disconnect_shell ()

void
unity_gtk_action_group_disconnect_shell
                               (UnityGtkActionGroup *group,
                                UnityGtkMenuShell *shell);

Removes the actions for shell from group .

Parameters

group

a UnityGtkActionGroup.

 

shell

a UnityGtkMenuShell.

 

unity_gtk_action_group_set_debug ()

void
unity_gtk_action_group_set_debug (gboolean debug);

Sets if action group changes should be logged using g_print().

Parameters

debug

TRUE to enable debugging output

 

Types and Values

struct UnityGtkActionGroup

struct UnityGtkActionGroup;

Opaque action group collector for UnityGtkMenuShell.


UnityGtkActionGroupClass

typedef GObjectClass                UnityGtkActionGroupClass;