diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2010-11-21 19:36:59 +0100 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2010-12-04 15:39:22 +0100 |
commit | ee37847952d9a256f3ff39da019af04e370091b5 (patch) | |
tree | 16804bcc854db891d9fbe9c9ceffb40b600bbccd /gtk/gtkcssprovider.c | |
parent | 5e26fb75a074ca1c641a94ddca53296300fb79a5 (diff) | |
download | gtk+-ee37847952d9a256f3ff39da019af04e370091b5.tar.gz |
GtkCssProvider: Use default value when handling "none".
This way the default value has a way to override other values in previous
GtkStyleProviders when merged.
Diffstat (limited to 'gtk/gtkcssprovider.c')
-rw-r--r-- | gtk/gtkcssprovider.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c index 31b28727fa..704ca92774 100644 --- a/gtk/gtkcssprovider.c +++ b/gtk/gtkcssprovider.c @@ -2964,8 +2964,11 @@ parse_rule (GtkCssProvider *css_provider, if (strcmp (value_str, "none") == 0) { - /* Remove/unset the current value */ - g_hash_table_remove (priv->cur_properties, prop); + /* Insert the default value, so it has an opportunity + * to override other style providers when merged + */ + g_param_value_set_default (pspec, val); + g_hash_table_insert (priv->cur_properties, prop, val); } else if (pspec->value_type == G_TYPE_STRING) { |