Enlightenment CVS committal

Author  : raster
Project : e17
Module  : apps/e

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


Modified Files:
        e_mod_main.c e_mod_main.h 


Log Message:


hide thermometer when there is no temperature info...

===================================================================
RCS file: 
/cvsroot/enlightenment/e17/apps/e/src/modules/temperature/e_mod_main.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- e_mod_main.c        2 Jan 2005 02:39:44 -0000       1.1
+++ e_mod_main.c        5 Jan 2005 07:56:56 -0000       1.2
@@ -602,6 +602,8 @@
    edje_object_size_min_calc(ef->temp_object, &bw, &bh);
    ef->minsize = bh;
    ef->minsize = bw;
+   
+   ef->have_temp = -1;
 
    _temperature_face_reconfigure(ef);
    
@@ -747,10 +749,22 @@
    therms = e_file_ls("/proc/acpi/thermal_zone");
    if (!therms)
      {
-       /* disable therm object */
+       if (ef->have_temp != 0)
+         {
+            /* disable therm object */
+            edje_object_signal_emit(ef->temp_object, "unknown", "");
+            edje_object_part_text_set(ef->temp_object, "reading", "NO TEMP");
+            ef->have_temp = 0;
+         }
      }
    else
      {
+       if (ef->have_temp != 1)
+         {
+            /* disable therm object */
+            edje_object_signal_emit(ef->temp_object, "known", "");
+            ef->have_temp = 1;
+         }
        while (therms)
          {
             char buf[4096], units[32];
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/apps/e/src/modules/temperature/e_mod_main.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- e_mod_main.h        2 Jan 2005 02:39:44 -0000       1.1
+++ e_mod_main.h        5 Jan 2005 07:56:56 -0000       1.2
@@ -41,6 +41,8 @@
    Evas_Coord      xx, yy;
    Evas_Coord      fx, fy, fw;
    
+   int             have_temp;
+   
    Ecore_Timer         *temperature_check_timer;
    
    Ecore_Event_Handler *ev_handler_container_resize;




-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to