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:
@ -1404,6 +1404,17 @@ st_widget_name_notify (StWidget *widget,
|
||||
st_widget_style_changed (widget);
|
||||
}
|
||||
|
||||
static void
|
||||
st_widget_reactive_notify (StWidget *widget,
|
||||
GParamSpec *pspec,
|
||||
gpointer data)
|
||||
{
|
||||
if (clutter_actor_get_reactive (CLUTTER_ACTOR (widget)))
|
||||
st_widget_remove_style_pseudo_class (widget, "insensitive");
|
||||
else
|
||||
st_widget_add_style_pseudo_class (widget, "insensitive");
|
||||
}
|
||||
|
||||
static void
|
||||
st_widget_first_child_notify (StWidget *widget,
|
||||
GParamSpec *pspec,
|
||||
@ -1466,6 +1477,7 @@ st_widget_init (StWidget *actor)
|
||||
|
||||
/* connect style changed */
|
||||
g_signal_connect (actor, "notify::name", G_CALLBACK (st_widget_name_notify), NULL);
|
||||
g_signal_connect (actor, "notify::reactive", G_CALLBACK (st_widget_reactive_notify), NULL);
|
||||
|
||||
g_signal_connect (actor, "notify::first-child", G_CALLBACK (st_widget_first_child_notify), NULL);
|
||||
g_signal_connect (actor, "notify::last-child", G_CALLBACK (st_widget_last_child_notify), NULL);
|
||||
|
Reference in New Issue
Block a user