Enlightenment CVS committal

Author  : englebass
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/modules/temperature


Modified Files:
        e_mod_main.c 


Log Message:
Only search once per session.

===================================================================
RCS file: /cvs/e/e17/apps/e/src/modules/temperature/e_mod_main.c,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -3 -r1.86 -r1.87
--- e_mod_main.c        16 Sep 2007 00:02:53 -0000      1.86
+++ e_mod_main.c        16 Sep 2007 10:55:16 -0000      1.87
@@ -49,6 +49,8 @@
 static E_Config_DD *conf_edd = NULL;
 static E_Config_DD *conf_face_edd = NULL;
 
+static int uuid = 0;
+
 static Config *temperature_config = NULL;
 
 static E_Gadcon_Client *
@@ -150,10 +152,8 @@
 {
    Config_Face *inst;
    char         id[128];
-   int          num = 0;
 
-   evas_hash_foreach(temperature_config->faces, _temperature_face_id_max, 
&num);
-   snprintf(id, sizeof(id), "%s.%d", _gadcon_class.name, num + 1);
+   snprintf(id, sizeof(id), "%s.%d", _gadcon_class.name, ++uuid);
 
    inst = E_NEW(Config_Face, 1);
    inst->id = evas_stringshare_add(id);
@@ -581,7 +581,7 @@
    int        *max;
    int         num = -1;
 
-   max = (int *)fdata;
+   max = fdata;
    p = strrchr(key, '.');
    if (p) num = atoi(p + 1);
    if (num > *max) *max = num;
@@ -691,6 +691,10 @@
    if (!temperature_config)
      {
        temperature_config = E_NEW(Config, 1);
+     }
+   else
+     {
+       evas_hash_foreach(temperature_config->faces, _temperature_face_id_max, 
&uuid);
      }
    temperature_config->module = m;
    



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to