[metacity/cowbell] take images from directory according to theme



commit 0eb1910e9558e63f28724a0ebb016b6deff40edf
Author: Thomas Thurman <tthurman gnome org>
Date:   Tue Oct 27 00:58:55 2009 -0400

    take images from directory according to theme

 src/ui/theme.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/ui/theme.c b/src/ui/theme.c
index f748e3a..2970f37 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -254,23 +254,24 @@ cowbell_url (GSList const	*args,
   /* also to check if the file exists! */
 
   char *filename = NULL;
+  MetaTheme **theme = (MetaTheme**) user_data;
 
   g_return_val_if_fail (args && args->data, NULL);
   filename = (char*) args->data;
 
   if (strcmp (filename, "wm:icon")==0)
     {
-      return g_strdup_printf ("file:///usr/share/icons/gnome/24x24/actions/gtk-edit.png");
+      return g_strdup ("file:///usr/share/icons/gnome/24x24/actions/gtk-edit.png");
     }
   else
     {
-      return g_strdup_printf ("file:///home/tthurman/.themes/Human/%s", filename);
+      return g_strdup_printf ("file://%s/%s", (*theme)->directory, filename);
     }
 }
 
 static ccss_function_t const cowbell_functions[] = 
 {
-  { "url",	cowbell_url,	NULL },
+  { "url",	cowbell_url,	&the_theme },
   { NULL }
 };
 



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