[gtk+/gtk-style-context: 358/540] GtkCssProvider: Handle the "none" keyword to unset properties.
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-style-context: 358/540] GtkCssProvider: Handle the "none" keyword to unset properties.
- Date: Fri, 3 Dec 2010 03:06:14 +0000 (UTC)
commit f8317df0b228d1a9c9dfb7a338d216a039cc99dd
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Nov 13 02:30:53 2010 +0100
GtkCssProvider: Handle the "none" keyword to unset properties.
gtk/gtkcssprovider.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c
index d41df05..6aec774 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -2644,7 +2644,12 @@ parse_rule (GtkCssProvider *css_provider,
val = g_slice_new0 (GValue);
g_value_init (val, prop_type);
- if (prop_type == G_TYPE_STRING)
+ if (strcmp (value_str, "none") == 0)
+ {
+ /* Remove/unset the current value */
+ g_hash_table_remove (priv->cur_properties, prop);
+ }
+ else if (prop_type == G_TYPE_STRING)
{
g_value_set_string (val, value_str);
g_hash_table_insert (priv->cur_properties, prop, val);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]