Enlightenment CVS committal

Author  : pfritz
Project : e17
Module  : apps/elitaire

Dir     : e17/apps/elitaire/src


Modified Files:
        edje_frontend_game.cpp edje_frontend_gui.cpp 


Log Message:
some theme improvements (glow font);
some minor things

===================================================================
RCS file: /cvs/e/e17/apps/elitaire/src/edje_frontend_game.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- edje_frontend_game.cpp      9 Jun 2007 23:20:09 -0000       1.2
+++ edje_frontend_game.cpp      6 Jul 2007 23:58:32 -0000       1.3
@@ -173,7 +173,6 @@
     Eli_Edje_Frontend * eef;
 
     eef = eli_app_edje_frontend_get(eap);
-
     elitaire_object_giveup(eef->elitaire);
 }
 
@@ -283,8 +282,10 @@
                           const char * source)
 {
     Eli_App * eap;
+    Eli_Edje_Frontend * eef;
 
     eap = (Eli_App *) data;
+    eef = eli_app_edje_frontend_get(eap);
 
     if (!strcmp(source, "")) {
         if (eap->current.game) {
@@ -297,7 +298,10 @@
         const char * game;
 
         game = edje_object_part_text_get(o, "elitaire_element_value");
-        eli_app_game_new(eap, game);
+        if (game) {
+            edje_object_signal_emit(eef->gui, "game,selected", "elitaire");
+            eli_app_game_new(eap, game);
+        }
     }
 }
 
@@ -313,24 +317,33 @@
         else {
             char * theme;
 
-            theme = ecore_config_theme_get("/theme/gui");
-            //eli_app_theme_change(eap, theme);
+            if ((theme = ecore_config_theme_get("/theme/gui"))) {
+                /* FIXME: shouldn't we do here some thing? */
+                //eli_app_theme_change(eap, theme);
+                edje_object_signal_emit(eef->gui, "theme,selected", 
"elitaire");
+                free(theme);
+            }
         }
         break;
                
     case CARDS:
-        if (!eef->elitaire) break;
-        else {
-            char * cards;
+    {
+        char * cards;
 
-            cards = ecore_config_theme_get("/theme/cards");
+        if ((cards = ecore_config_theme_get("/theme/cards"))) {
             if (eap->theme.cards.current) free(eap->theme.cards.current);      
             eap->theme.cards.current = cards;
-            cards = ecore_config_theme_with_path_from_name_get(
-                           eap->theme.cards.current);
+        }
+
+        edje_object_signal_emit(eef->gui, "cards,selected", "elitaire");
+
+        if (eap->theme.cards.current && eef->elitaire
+                && (cards = ecore_config_theme_with_path_from_name_get(
+                        eap->theme.cards.current))) {
             elitaire_object_file_set(eef->elitaire, cards);
+            free(cards);
         }
         break;
-               
+    }  
     case VELOCITY:
     {    
            int v;
===================================================================
RCS file: /cvs/e/e17/apps/elitaire/src/edje_frontend_gui.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- edje_frontend_gui.cpp       28 Jun 2007 23:43:21 -0000      1.6
+++ edje_frontend_gui.cpp       6 Jul 2007 23:58:32 -0000       1.7
@@ -620,15 +620,19 @@
 static void _theme_item_selected_cb(void * data, Evas_Object * o,
                              const char * emission, const char * source)
 {
-    ecore_config_theme_set("/theme/gui", 
-                   edje_object_part_text_get(o, "elitaire_element_value"));
+    const char * theme;
+
+    if ((theme = edje_object_part_text_get(o, "elitaire_element_value"))) 
+        ecore_config_theme_set("/theme/gui", theme);
 }
 
 static void _cards_item_selected_cb(void * data, Evas_Object * o,
                              const char * emission, const char * source)
 {
-    ecore_config_theme_set("/theme/cards", 
-                   edje_object_part_text_get(o, "elitaire_element_value"));
+    const char * theme;
+
+    if ((theme = edje_object_part_text_get(o, "elitaire_element_value")))
+        ecore_config_theme_set("/theme/cards", theme);
 }
 
 /* Fill the theme container for selecting the theme */



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to