st-widget: Move reactivity tracking to StWidget, use "insensitive"

This lets use remove another few pieces of code that do the tracking
manually.

https://bugzilla.gnome.org/show_bug.cgi?id=680426
This commit is contained in:
Jasper St. Pierre
2012-07-22 20:46:48 -03:00
parent 26031eb761
commit 414fe75d02
5 changed files with 14 additions and 31 deletions

View File

@ -446,15 +446,6 @@ st_button_class_init (StButtonClass *klass)
G_TYPE_INT);
}
static void
notify_reactive_cb (StWidget *button)
{
if (clutter_actor_get_reactive (CLUTTER_ACTOR (button)))
st_widget_remove_style_pseudo_class (button, "disabled");
else
st_widget_add_style_pseudo_class (button, "disabled");
}
static void
st_button_init (StButton *button)
{
@ -464,9 +455,6 @@ st_button_init (StButton *button)
clutter_actor_set_reactive (CLUTTER_ACTOR (button), TRUE);
st_widget_set_track_hover (ST_WIDGET (button), TRUE);
g_signal_connect(button, "notify::reactive",
G_CALLBACK (notify_reactive_cb), NULL);
}
/**