[metacity/cowbell] basic loading (with filename hardcoded still)



commit 5f4d174f733b058163f1f9b19bae82b2fb26770e
Author: Thomas Thurman <tthurman gnome org>
Date:   Sat Oct 17 01:06:35 2009 -0400

    basic loading (with filename hardcoded still)

 src/ui/theme.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/src/ui/theme.c b/src/ui/theme.c
index d8b198c..287dd1d 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -130,12 +130,21 @@ meta_theme_get_current (void)
   return the_theme;
 }
 
+static ccss_function_t const cowbell_functions[] = 
+{
+  /* { "url",	url,	NULL }, */
+  { NULL }
+};
+
 void
 meta_theme_set_current (const char *name,
                         gboolean    force_reload)
 {
   /* stub */
 
+  ccss_grammar_t        *grammar;
+  ccss_stylesheet_t	*stylesheet;
+
   if (!the_theme)
     {
       cowbell_initialise_classes ();
@@ -143,6 +152,12 @@ meta_theme_set_current (const char *name,
       the_theme = g_new0 (MetaTheme, 1);
     }
 
+  grammar = ccss_cairo_grammar_create ();
+  ccss_grammar_add_functions (grammar, cowbell_functions);
+  stylesheet = ccss_grammar_create_stylesheet_from_file (grammar,
+                                                         "/home/tthurman/.themes/Human/Human.css",
+                                                         NULL);
+
   g_warning ("THEMES: Setting theme to %s\n", name);
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]