summaryrefslogtreecommitdiff
path: root/gtk/gtktoggleaction.c
diff options
context:
space:
mode:
authorJavier Jardón <jjardon@gnome.org>2010-07-16 18:34:46 +0200
committerJavier Jardón <jjardon@gnome.org>2010-07-19 15:16:03 +0200
commit1bfa931e2033e81d226483394a90cbbbe33a92b1 (patch)
tree44fa332ca3b2f526ca8f4b72b9a991847a3ac152 /gtk/gtktoggleaction.c
parent4682d563cff99cc92734bfd9bda53eb8e6041ddf (diff)
downloadgtk+-1bfa931e2033e81d226483394a90cbbbe33a92b1.tar.gz
Add _gtk_toggle_action_set_active() internal function
It's needed in gtkradioaction Fixes https://bugzilla.gnome.org/show_bug.cgi?id=624540
Diffstat (limited to 'gtk/gtktoggleaction.c')
-rw-r--r--gtk/gtktoggleaction.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gtk/gtktoggleaction.c b/gtk/gtktoggleaction.c
index ae82082613..86ec59ba43 100644
--- a/gtk/gtktoggleaction.c
+++ b/gtk/gtktoggleaction.c
@@ -364,3 +364,23 @@ create_menu_item (GtkAction *action)
"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;
+}