summaryrefslogtreecommitdiff
path: root/gtk/gtktoggletoolbutton.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2014-06-09 09:43:49 -0400
committerMatthias Clasen <mclasen@redhat.com>2014-06-09 13:31:11 -0400
commitdb8101c99810df820fc5b665f698c5b4829b131a (patch)
tree8e6735803b59b2bb18d192bb7c27b9e9bacb7cd4 /gtk/gtktoggletoolbutton.c
parentb73e8106137564ed95cc5f8aa96d72f01722e8ee (diff)
downloadgtk+-db8101c99810df820fc5b665f698c5b4829b131a.tar.gz
GtkToggleToolButton: Use G_PARAM_EXPLICIT_NOTIFY
Diffstat (limited to 'gtk/gtktoggletoolbutton.c')
-rw-r--r--gtk/gtktoggletoolbutton.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/gtk/gtktoggletoolbutton.c b/gtk/gtktoggletoolbutton.c
index f7391143ea..5cd0f8804e 100644
--- a/gtk/gtktoggletoolbutton.c
+++ b/gtk/gtktoggletoolbutton.c
@@ -124,10 +124,10 @@ gtk_toggle_tool_button_class_init (GtkToggleToolButtonClass *klass)
g_object_class_install_property (object_class,
PROP_ACTIVE,
g_param_spec_boolean ("active",
- P_("Active"),
- P_("If the toggle button should be pressed in"),
- FALSE,
- GTK_PARAM_READWRITE));
+ P_("Active"),
+ P_("If the toggle button should be pressed in"),
+ FALSE,
+ GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkToggleToolButton::toggled:
@@ -445,14 +445,17 @@ gtk_toggle_tool_button_new_from_stock (const gchar *stock_id)
**/
void
gtk_toggle_tool_button_set_active (GtkToggleToolButton *button,
- gboolean is_active)
+ gboolean is_active)
{
g_return_if_fail (GTK_IS_TOGGLE_TOOL_BUTTON (button));
is_active = is_active != FALSE;
if (button->priv->active != is_active)
- gtk_button_clicked (GTK_BUTTON (_gtk_tool_button_get_button (GTK_TOOL_BUTTON (button))));
+ {
+ gtk_button_clicked (GTK_BUTTON (_gtk_tool_button_get_button (GTK_TOOL_BUTTON (button))));
+ g_object_notify (G_OBJECT (button), "active");
+ }
}
/**