GtkStyleContext: restore widget state too in restore().

This commit is contained in:
Carlos Garnacho 2010-11-08 02:53:12 +01:00
parent 8b267a58da
commit 405f2f306a

View File

@ -222,6 +222,7 @@ struct GtkStyleInfo
GArray *style_classes;
GArray *regions;
GtkJunctionSides junction_sides;
GtkStateFlags state_flags;
};
struct StyleData
@ -256,8 +257,6 @@ struct GtkStyleContextPrivate
GSList *info_stack;
StyleData *current_data;
GtkStateFlags state_flags;
GSList *animation_regions;
GSList *animations;
@ -1275,11 +1274,13 @@ gtk_style_context_set_state (GtkStyleContext *context,
GtkStateFlags flags)
{
GtkStyleContextPrivate *priv;
GtkStyleInfo *info;
g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
priv = context->priv;
priv->state_flags = flags;
info = priv->info_stack->data;
info->state_flags = flags;
}
/**
@ -1296,11 +1297,14 @@ GtkStateFlags
gtk_style_context_get_state (GtkStyleContext *context)
{
GtkStyleContextPrivate *priv;
GtkStyleInfo *info;
g_return_val_if_fail (GTK_IS_STYLE_CONTEXT (context), 0);
priv = context->priv;
return priv->state_flags;
info = priv->info_stack->data;
return info->state_flags;
}
static gboolean