Enlightenment CVS committal

Author  : dj2
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_theme.c 


Log Message:
- add some code to start to handle theme switching again

===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_theme.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -3 -r1.28 -r1.29
--- ewl_theme.c 13 Dec 2006 07:18:59 -0000      1.28
+++ ewl_theme.c 3 Jan 2007 21:59:04 -0000       1.29
@@ -3,6 +3,7 @@
 #include "ewl_macros.h"
 #include "ewl_private.h"
 
+extern Ecore_List *ewl_embed_list;
 static char *ewl_theme_path = NULL;
 
 static Ecore_List *ewl_theme_font_paths = NULL;
@@ -74,6 +75,8 @@
 int
 ewl_theme_theme_set(const char *theme_name)
 {
+       Ewl_Widget *w;
+
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET("theme_name", theme_name, FALSE);
 
@@ -96,6 +99,20 @@
        if (!ewl_theme_path) DRETURN_INT(FALSE, DLEVEL_STABLE); 
 
        ewl_theme_font_path_init();
+
+       /* Hide all embeds. If the embed was previously shown we re-show it
+        * again. This should cause everything to reset it's theme values to the
+        * new values */
+       ecore_list_goto_first(ewl_embed_list);
+       while ((w = ecore_list_next(ewl_embed_list)))
+       {
+               int vis;
+
+               vis = REALIZED(w);
+
+               ewl_widget_unrealize(w);
+               if (vis) ewl_widget_realize(w);
+       }
 
        DRETURN_INT(TRUE, DLEVEL_STABLE);
 }



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to