GtkWidget: Hook up widget style property querying to style context.
This commit is contained in:
@ -10680,15 +10680,12 @@ gtk_widget_style_get_property (GtkWidget *widget,
|
|||||||
const gchar *property_name,
|
const gchar *property_name,
|
||||||
GValue *value)
|
GValue *value)
|
||||||
{
|
{
|
||||||
GtkWidgetPrivate *priv;
|
|
||||||
GParamSpec *pspec;
|
GParamSpec *pspec;
|
||||||
|
|
||||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||||
g_return_if_fail (property_name != NULL);
|
g_return_if_fail (property_name != NULL);
|
||||||
g_return_if_fail (G_IS_VALUE (value));
|
g_return_if_fail (G_IS_VALUE (value));
|
||||||
|
|
||||||
priv = widget->priv;
|
|
||||||
|
|
||||||
g_object_ref (widget);
|
g_object_ref (widget);
|
||||||
pspec = g_param_spec_pool_lookup (style_property_spec_pool,
|
pspec = g_param_spec_pool_lookup (style_property_spec_pool,
|
||||||
property_name,
|
property_name,
|
||||||
@ -10701,12 +10698,13 @@ gtk_widget_style_get_property (GtkWidget *widget,
|
|||||||
property_name);
|
property_name);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
GtkStyleContext *context;
|
||||||
const GValue *peek_value;
|
const GValue *peek_value;
|
||||||
|
|
||||||
peek_value = _gtk_style_peek_property_value (priv->style,
|
context = gtk_widget_get_style_context (widget);
|
||||||
G_OBJECT_TYPE (widget),
|
peek_value = _gtk_style_context_peek_style_property (context,
|
||||||
pspec,
|
G_OBJECT_TYPE (widget),
|
||||||
(GtkRcPropertyParser) g_param_spec_get_qdata (pspec, quark_property_parser));
|
pspec);
|
||||||
|
|
||||||
/* auto-conversion of the caller's value type
|
/* auto-conversion of the caller's value type
|
||||||
*/
|
*/
|
||||||
@ -10739,14 +10737,13 @@ gtk_widget_style_get_valist (GtkWidget *widget,
|
|||||||
const gchar *first_property_name,
|
const gchar *first_property_name,
|
||||||
va_list var_args)
|
va_list var_args)
|
||||||
{
|
{
|
||||||
GtkWidgetPrivate *priv;
|
GtkStyleContext *context;
|
||||||
const gchar *name;
|
const gchar *name;
|
||||||
|
|
||||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||||
|
|
||||||
priv = widget->priv;
|
|
||||||
|
|
||||||
g_object_ref (widget);
|
g_object_ref (widget);
|
||||||
|
context = gtk_widget_get_style_context (widget);
|
||||||
|
|
||||||
name = first_property_name;
|
name = first_property_name;
|
||||||
while (name)
|
while (name)
|
||||||
@ -10769,10 +10766,10 @@ gtk_widget_style_get_valist (GtkWidget *widget,
|
|||||||
}
|
}
|
||||||
/* style pspecs are always readable so we can spare that check here */
|
/* style pspecs are always readable so we can spare that check here */
|
||||||
|
|
||||||
peek_value = _gtk_style_peek_property_value (priv->style,
|
peek_value = _gtk_style_context_peek_style_property (context,
|
||||||
G_OBJECT_TYPE (widget),
|
G_OBJECT_TYPE (widget),
|
||||||
pspec,
|
pspec);
|
||||||
(GtkRcPropertyParser) g_param_spec_get_qdata (pspec, quark_property_parser));
|
|
||||||
G_VALUE_LCOPY (peek_value, var_args, 0, &error);
|
G_VALUE_LCOPY (peek_value, var_args, 0, &error);
|
||||||
if (error)
|
if (error)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user