[metacity/cowbell] slightly less stubby version of cowbell_url



commit 440e0e8397a3fb0d2888123df742c131eea8f7c9
Author: Thomas Thurman <tthurman gnome org>
Date:   Sat Oct 17 01:45:10 2009 -0400

    slightly less stubby version of cowbell_url

 src/ui/theme.c |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)
---
diff --git a/src/ui/theme.c b/src/ui/theme.c
index 0e8d1ae..4aced27 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -143,9 +143,23 @@ static char *
 cowbell_url (GSList const	*args,
              void		*user_data)
 {
-  /* stub */
+  /* stub which actually works in most cases (for me) but is stupid */
+  /* what we need is to store the path in the theme object */
+  /* also to check if the file exists! */
+
+  char *filename = NULL;
 
-  return g_strdup ("/usr/share/icons/gnome/24x24/actions/gtk-edit.png");
+  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");
+    }
+  else
+    {
+      return g_strdup_printf ("file:///home/tthurman/.themes/Human/%s", filename);
+    }
 }
 
 static ccss_function_t const cowbell_functions[] = 



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