summaryrefslogtreecommitdiff
path: root/ccss-gtk
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 /ccss-gtk
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.
Diffstat (limited to 'ccss-gtk')
-rw-r--r--ccss-gtk/ccss-gtk-stylesheet.c8
1 files changed, 8 insertions, 0 deletions
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);