+
+
+/**
+ * gtk_toggle_action_set_draw_as_radio:
+ * @action: the action object
+ * @draw_as_radio: whether the action should have proxies like a radio
+ * action
+ *
+ * Sets whether the action should have proxies like a radio action.
+ *
+ * Since: 2.4
+ */
+void
+gtk_toggle_action_set_draw_as_radio (GtkToggleAction *action,
+ gboolean draw_as_radio)
+{
+ g_return_if_fail (GTK_IS_TOGGLE_ACTION (action));
+
+ draw_as_radio = draw_as_radio != FALSE;
+
+ if (action->private_data->draw_as_radio != draw_as_radio)
+ {
+ action->private_data->draw_as_radio = draw_as_radio;
+
+ g_object_notify (G_OBJECT (action), "draw-as-radio");
+ }
+}
+
+/**
+ * gtk_toggle_action_get_draw_as_radio:
+ * @action: the action object
+ *
+ * Returns whether the action should have proxies like a radio action.
+ *
+ * Returns: whether the action should have proxies like a radio action.
+ *
+ * Since: 2.4
+ */
+gboolean
+gtk_toggle_action_get_draw_as_radio (GtkToggleAction *action)
+{
+ g_return_val_if_fail (GTK_IS_TOGGLE_ACTION (action), FALSE);
+
+ return action->private_data->draw_as_radio;
+}
+
+static GtkWidget *
+create_menu_item (GtkAction *action)
+{
+ GtkToggleAction *toggle_action = GTK_TOGGLE_ACTION (action);
+
+ return g_object_new (GTK_TYPE_CHECK_MENU_ITEM,
+ "draw-as-radio", toggle_action->private_data->draw_as_radio,
+ NULL);
+}
+
+
+/* Private */
+
+/*
+ * _gtk_toggle_action_set_active:
+ * @toggle_action: a #GtkToggleAction
+ * @is_active: whether the action is active or not
+ *
+ * Sets the #GtkToggleAction:active property directly. This function does
+ * not emit signals or notifications: it is left to the caller to do so.
+ */
+void
+_gtk_toggle_action_set_active (GtkToggleAction *toggle_action,
+ gboolean is_active)
+{
+ GtkToggleActionPrivate *priv = toggle_action->private_data;
+
+ priv->active = is_active;
+}