Enlightenment CVS committal

Author  : ningerso
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_theme.c ewl_theme.h ewl_icon_theme.c 


Log Message:
Export this define so we don't duplicate it in the icon_theme.
Also allows for removal of custom theme settings that were applied to a widget.

===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_theme.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -3 -r1.25 -r1.26
--- ewl_theme.c 26 Oct 2006 05:15:54 -0000      1.25
+++ ewl_theme.c 26 Oct 2006 05:32:03 -0000      1.26
@@ -3,8 +3,6 @@
 #include "ewl_macros.h"
 #include "ewl_private.h"
 
-#define NOMATCH ((char *)0xdeadbeef)
-
 static char *ewl_theme_path = NULL;
 
 static Ecore_List *ewl_theme_font_paths = NULL;
@@ -289,7 +287,7 @@
                        ret = ecore_hash_get(w->theme, temp);
 
                if (ret) {
-                       if (ret != NOMATCH)
+                       if (ret != EWL_THEME_KEY_NOMATCH)
                                ret = strdup(ret);
                        break;
                }
@@ -310,7 +308,7 @@
                while (temp && !ret) {
                        ret = ecore_hash_get(ewl_theme_def_data, temp);
                        if (ret) {
-                               if (ret != NOMATCH)
+                               if (ret != EWL_THEME_KEY_NOMATCH)
                                        ret = strdup(ret);
                                break;
                        }
@@ -336,13 +334,14 @@
         * Mark unmatched keys in the cache.
         */
        if (!ret) {
-               ecore_hash_set(ewl_theme_def_data, strdup(key), NOMATCH);
+               ecore_hash_set(ewl_theme_def_data, strdup(key),
+                               EWL_THEME_KEY_NOMATCH);
        }
 
        /*
         * Fixup unmatched keys in the cache.
         */
-       if (ret == NOMATCH)
+       if (ret == EWL_THEME_KEY_NOMATCH)
                ret = NULL;
 
        DRETURN_PTR(ret, DLEVEL_STABLE);
@@ -396,10 +395,10 @@
                ecore_hash_set_free_value(w->theme, ewl_theme_data_free);
        }
 
-       if (v)
+       if (v && v != EWL_THEME_KEY_NOMATCH)
                ecore_hash_set(w->theme, strdup(k), strdup(v));
        else
-               ecore_hash_set(w->theme, strdup(k), NOMATCH);
+               ecore_hash_set(w->theme, strdup(k), EWL_THEME_KEY_NOMATCH);
 
        if (REALIZED(w)) {
                ewl_widget_unrealize(w);
@@ -557,7 +556,7 @@
 {
        DENTER_FUNCTION(DLEVEL_STABLE);
 
-       if (!data || data == (void *)NOMATCH)
+       if (!data || data == (void *)EWL_THEME_KEY_NOMATCH)
                DRETURN(DLEVEL_STABLE);
 
        FREE(data);
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_theme.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- ewl_theme.h 30 Sep 2006 22:31:36 -0000      1.8
+++ ewl_theme.h 26 Oct 2006 05:32:03 -0000      1.9
@@ -46,6 +46,8 @@
 int             ewl_theme_data_int_get(Ewl_Widget *w, char *k);
 void            ewl_theme_data_int_set(Ewl_Widget *w, char *k, int v);
 
+#define EWL_THEME_KEY_NOMATCH ((char *)0xdeadbeef)
+
 /**
  * @}
  */
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_icon_theme.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- ewl_icon_theme.c    4 Oct 2006 15:42:55 -0000       1.9
+++ ewl_icon_theme.c    26 Oct 2006 05:32:03 -0000      1.10
@@ -3,8 +3,6 @@
 #include "ewl_macros.h"
 #include "ewl_private.h"
 
-#define NOMATCH ((char *)0xdeadbeef)
-
 static int ewl_icon_theme_is_edje = 0;
 
 static Ecore_Hash *ewl_icon_theme_cache = NULL;
@@ -115,12 +113,12 @@
        if (!ret)
        {
                ret = ecore_desktop_icon_find(icon, icon_size, icon_theme);
-               if (!ret) ret = NOMATCH;
+               if (!ret) ret = EWL_THEME_KEY_NOMATCH;
 
                ecore_hash_set(ewl_icon_theme_cache, strdup(key), ret);
        }
        
-       if (ret == NOMATCH)
+       if (ret == EWL_THEME_KEY_NOMATCH)
                ret = NULL;
 
        DRETURN_PTR(ret, DLEVEL_STABLE);
@@ -131,7 +129,7 @@
 {
        DENTER_FUNCTION(DLEVEL_STABLE);
 
-       if (data == NOMATCH)
+       if (data == EWL_THEME_KEY_NOMATCH)
                DRETURN(DLEVEL_STABLE);
 
        IF_FREE(data);



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to