Enlightenment CVS committal

Author  : handyande
Project : misc
Module  : engage

Dir     : misc/engage/src


Modified Files:
        config.c 


Log Message:
Fix the RGB handling and a few warnings
===================================================================
RCS file: /cvsroot/enlightenment/misc/engage/src/config.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -3 -r1.54 -r1.55
--- config.c    3 Dec 2005 02:14:40 -0000       1.54
+++ config.c    18 Jan 2006 12:38:01 -0000      1.55
@@ -54,11 +54,16 @@
 }
 
 unsigned
-od_argb_to_colour(char *argb)
+od_argb_get(const char *key)
 {
   unsigned        tmp;
+  int             a, r, g, b;
 
-  tmp=strtoul((char *)argb+1, NULL, 16);
+  ecore_config_argb_get(key, &a, &r, &g, &b);
+  tmp=((a << 24) & 0xff000000 )
+      | ((r << 16) &   0xff0000 )
+      | ((g <<  8) &     0xff00 )
+      | ( b        &       0xff );
   return tmp;
 }
 
@@ -68,7 +73,7 @@
 {
   unsigned        colour;
 
-  colour = od_argb_to_colour(ecore_config_argbstr_get(key));
+  colour = od_argb_get(key);
 
   switch (tag) {
     case BG_FORE:
@@ -176,11 +181,11 @@
     ecore_config_float_get("engage.options.zoom_duration");
 
   options.bg_fore =
-    od_argb_to_colour(ecore_config_argbstr_get("engage.options.bg_fore"));
+    od_argb_get("engage.options.bg_fore");
   ecore_config_listen("colour", "engage.options.bg_fore", 
                       colour_listener, BG_FORE, NULL);
   options.bg_back = 
-    od_argb_to_colour(ecore_config_argbstr_get("engage.options.bg_back"));
+    od_argb_get("engage.options.bg_back");
   ecore_config_listen("colour", "engage.options.bg_back", 
                       colour_listener, BG_BACK, NULL);
 
@@ -254,7 +259,7 @@
 
   embed =
     ewl_embed_evas_set(EWL_EMBED(menu_win), evas,
-                       ecore_evas_software_x11_window_get(ee));
+                       
EWL_EMBED_EVAS_WINDOW(ecore_evas_software_x11_window_get(ee)));
   evas_object_layer_set(embed, 999);
 
   /* FIXME: this should not be needed */




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to