Method

GtkRadioMenuItemjoin_group

since: 3.18

Declaration [src]

void
gtk_radio_menu_item_join_group (
  GtkRadioMenuItem* radio_menu_item,
  GtkRadioMenuItem* group_source
)

Description [src]

Joins a GtkRadioMenuItem object to the group of another GtkRadioMenuItem object.

This function should be used by language bindings to avoid the memory manangement of the opaque GSList of gtk_radio_menu_item_get_group() and gtk_radio_menu_item_set_group().

A common way to set up a group of GtkRadioMenuItem instances is:

  GtkRadioMenuItem *last_item = NULL;

  while ( ...more items to add... )
    {
      GtkRadioMenuItem *radio_item;

      radio_item = gtk_radio_menu_item_new (...);

      gtk_radio_menu_item_join_group (radio_item, last_item);
      last_item = radio_item;
    }

Available since: 3.18

Parameters

group_source

Type: GtkRadioMenuItem

A GtkRadioMenuItem whose group we are joining, or NULL to remove the radio_menu_item from its current group.

The argument can be NULL.
The data is owned by the caller of the method.