summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Staudinger <robsta@gnome.org>2008-12-17 13:34:12 +0100
committerRobert Staudinger <robsta@gnome.org>2008-12-17 13:34:12 +0100
commit2216631689f2c3e9cc1eed017ed2df413213e28e (patch)
tree07ca4a88d8bd22fe5e80557b11c50cc2dfcfdbe7
parentd3d7f4fdce94c7401f07d2d2c03359fc270b8554 (diff)
* ccss-gtk/ccss-gtk-stylesheet.c (serialize): export engine-specific
gtkrc block with type selector, to fall back when drawing without a widget pointer.
-rw-r--r--ChangeLog6
-rw-r--r--ccss-gtk/ccss-gtk-stylesheet.c8
2 files changed, 14 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index b0cfdd8..db7188f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-12-17 Robert Staudinger <robsta@gnome.org>
+
+ * ccss-gtk/ccss-gtk-stylesheet.c (serialize): export engine-specific
+ gtkrc block with type selector, to fall back when drawing without a
+ widget pointer.
+
2008-12-11 Robert Staudinger <robsta@gnome.org>
* ccss-doc/ccss-sections.txt:
diff --git a/ccss-gtk/ccss-gtk-stylesheet.c b/ccss-gtk/ccss-gtk-stylesheet.c
index 4e747d3..5c440af 100644
--- a/ccss-gtk/ccss-gtk-stylesheet.c
+++ b/ccss-gtk/ccss-gtk-stylesheet.c
@@ -346,6 +346,7 @@ serialize (struct RcBlock const *block,
g_string_append_printf (rc_string, "style \"%s\" {\n", style_name);
+ /* Colors. */
if (NORMAL_SET & block->flags) {
serialize_state (&block->colors[NORMAL], "NORMAL", rc_string);
}
@@ -373,6 +374,13 @@ serialize (struct RcBlock const *block,
iter = iter->next;
}
+ /* Selector, for NULL widget pointer
+ * PONDERING: support complex selectors? */
+ g_string_append (rc_string, "\tengine \"css\" {\n");
+ g_string_append_printf (rc_string, "\t\tselector = \"%s\"\n", block->type_name);
+ g_string_append (rc_string, "\t}\n");
+
+ /* Close block. */
g_string_append (rc_string, "}\n");
g_string_append_printf (rc_string, "class \"%s\" style \"%s\"\n\n", block->type_name, style_name);