Enlightenment CVS committal

Author  : devilhorns
Project : e_modules
Module  : weather

Dir     : e_modules/weather


Modified Files:
        e_mod_main.c 


Log Message:
If we fail to get an update keep the current information that we 
previously had in the module. This stops blank weather on a failed 
update.


===================================================================
RCS file: /cvs/e/e_modules/weather/e_mod_main.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -3 -r1.33 -r1.34
--- e_mod_main.c        1 Jun 2006 21:53:37 -0000       1.33
+++ e_mod_main.c        3 Jun 2006 10:45:03 -0000       1.34
@@ -593,25 +593,15 @@
 
    if (!inst) return;
    snprintf(m, sizeof(m), "%s", e_module_dir_get(weather_config->module));
-   if (!ok)
-     {
-        snprintf(buf, sizeof(buf), "%s/images/unknown.png", m);
-        e_icon_file_set(inst->weather->icon_obj, buf);
-        edje_object_part_swallow(inst->weather->weather_obj, "icon", 
inst->weather->icon_obj);
-        edje_object_part_text_set(inst->weather->weather_obj, "location", "");
-        edje_object_part_text_set(inst->weather->weather_obj, "temp", "");
-        edje_object_part_text_set(inst->weather->weather_obj, "conditions", 
"");
-     }
-   else
-     {
-        snprintf(buf, sizeof(buf), "%s/images/%s", m, inst->icon);
-        e_icon_file_set(inst->weather->icon_obj, buf);
-        edje_object_part_swallow(inst->weather->weather_obj, "icon", 
inst->weather->icon_obj);
-        edje_object_part_text_set(inst->weather->weather_obj, "location", 
inst->location);
-        snprintf(buf, sizeof(buf), "%d°%c", inst->temp, inst->degrees);
-        edje_object_part_text_set(inst->weather->weather_obj, "temp", buf);
-        edje_object_part_text_set(inst->weather->weather_obj, "conditions", 
inst->conditions);
-     }
+   if (!ok) return;
+   
+   snprintf(buf, sizeof(buf), "%s/images/%s", m, inst->icon);
+   e_icon_file_set(inst->weather->icon_obj, buf);
+   edje_object_part_swallow(inst->weather->weather_obj, "icon", 
inst->weather->icon_obj);
+   edje_object_part_text_set(inst->weather->weather_obj, "location", 
inst->location);
+   snprintf(buf, sizeof(buf), "%d°%c", inst->temp, inst->degrees);
+   edje_object_part_text_set(inst->weather->weather_obj, "temp", buf);
+   edje_object_part_text_set(inst->weather->weather_obj, "conditions", 
inst->conditions);
 }
 
 void



_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to