Enlightenment CVS committal Author : devilhorns Project : e_modules Module : weather
Dir : e_modules/weather Modified Files: e_mod_config.c e_mod_main.c weather.edc Log Message: Bug Fix: Display state (simple/detailed) was not honored on a restart. Thanks Hawkwind :) Changed edc: Reduced font size and change to normal text class for sndev. Changed shadows to Outline_Shadow. Thanks xcomp :) =================================================================== RCS file: /cvs/e/e_modules/weather/e_mod_config.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -3 -r1.7 -r1.8 --- e_mod_config.c 19 May 2006 11:34:52 -0000 1.7 +++ e_mod_config.c 19 May 2006 18:40:16 -0000 1.8 @@ -76,9 +76,9 @@ o = e_widget_list_add(evas, 0, 0); of = e_widget_framelist_add(evas, D_("Display Settings"), 0); rg = e_widget_radio_group_new(&(cfdata->display)); - ob = e_widget_radio_add(evas, D_("Simple"), SIMPLE_DISPLAY, rg); + ob = e_widget_radio_add(evas, D_("Simple"), 0, rg); e_widget_framelist_object_append(of, ob); - ob = e_widget_radio_add(evas, D_("Detailed"), DETAILED_DISPLAY, rg); + ob = e_widget_radio_add(evas, D_("Detailed"), 1, rg); e_widget_framelist_object_append(of, ob); ob = e_widget_label_add(evas, D_("Poll Time")); e_widget_framelist_object_append(of, ob); =================================================================== RCS file: /cvs/e/e_modules/weather/e_mod_main.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -3 -r1.22 -r1.23 --- e_mod_main.c 19 May 2006 13:36:56 -0000 1.22 +++ e_mod_main.c 19 May 2006 18:40:16 -0000 1.23 @@ -73,11 +73,10 @@ Weather *w; Instance *inst; Config_Item *ci; - + inst = E_NEW(Instance, 1); - ci = _weather_config_item_get(gc->id); - if (!ci->id) ci->id = evas_stringshare_add(gc->id); - inst->id = evas_stringshare_add(gc->id); + ci = _weather_config_item_get(id); + inst->id = evas_stringshare_add(ci->id); w = _weather_new(gc->evas); w->inst = inst; @@ -118,7 +117,7 @@ _gc_shutdown(E_Gadcon_Client *gcc) { Instance *inst; - + inst = gcc->data; evas_stringshare_del(inst->id); if (inst->check_timer) @@ -207,7 +206,7 @@ Config_Item *ci; inst = data; - ci = _weather_config_item_get(inst->gcc->id); + ci = _weather_config_item_get(inst->gcc->id); _config_weather_module(ci); } @@ -228,7 +227,7 @@ ci = E_NEW(Config_Item, 1); ci->id = evas_stringshare_add(id); ci->poll_time = 900.0; - ci->display = SIMPLE_DISPLAY; + ci->display = 0; ci->degrees = DEGREES_F; ci->host = evas_stringshare_add("www.rssweather.com"); ci->code = evas_stringshare_add("KJFK"); @@ -248,7 +247,7 @@ EAPI void * e_modapi_init(E_Module *m) -{ +{ bindtextdomain(PACKAGE, LOCALEDIR); bind_textdomain_codeset(PACKAGE, "UTF-8"); @@ -280,7 +279,7 @@ ci = E_NEW(Config_Item, 1); ci->poll_time = 900.0; - ci->display = SIMPLE_DISPLAY; + ci->display = 0; ci->degrees = DEGREES_F; ci->host = evas_stringshare_add("www.rssweather.com"); ci->code = evas_stringshare_add("KJFK"); @@ -297,7 +296,7 @@ EAPI int e_modapi_shutdown(E_Module *m) -{ +{ weather_config->module = NULL; e_gadcon_provider_unregister(&_gadcon_class); @@ -359,6 +358,7 @@ inst = l->data; ci = _weather_config_item_get(inst->gcc->id); + if (ci->id) evas_stringshare_del(ci->id); ci->id = evas_stringshare_add(inst->gcc->id); } @@ -480,7 +480,7 @@ if (!inst) return 1; - ci = _weather_config_item_get(inst->gcc->id); + ci = _weather_config_item_get(inst->gcc->id); ev = event; if ((!weather_config->server) || (weather_config->server != ev->server)) return 1; @@ -616,6 +616,7 @@ inst = data; ci = _weather_config_item_get(inst->gcc->id); + if ((inst->degrees == 'F') && (ci->degrees == DEGREES_C)) { inst->temp = (inst->temp - 32) * 5.0 / 9.0; @@ -669,7 +670,7 @@ if (!weather_config) return; - ci = _weather_config_item_get(id); + ci = _weather_config_item_get(id); for (l = weather_config->instances; l; l = l->next) { Instance *inst; @@ -681,11 +682,11 @@ { switch (ci->display) { - case DETAILED_DISPLAY: - edje_object_signal_emit(inst->weather->weather_obj, "set_style", "detailed"); - break; - case SIMPLE_DISPLAY: + case 0: edje_object_signal_emit(inst->weather->weather_obj, "set_style", "simple"); + break; + case 1: + edje_object_signal_emit(inst->weather->weather_obj, "set_style", "detailed"); break; } =================================================================== RCS file: /cvs/e/e_modules/weather/weather.edc,v retrieving revision 1.10 retrieving revision 1.11 diff -u -3 -r1.10 -r1.11 --- weather.edc 19 May 2006 11:34:52 -0000 1.10 +++ weather.edc 19 May 2006 18:40:16 -0000 1.11 @@ -19,7 +19,7 @@ description { state: "default" 0.0; - color: 255 255 255 255; + color: 255 255 255 0; } } part @@ -65,9 +65,9 @@ { name: "temp"; type: TEXT; - clip_to: "base"; - effect: SOFT_SHADOW; + effect: OUTLINE_SHADOW; mouse_events: 0; + //clip_to: "base"; description { state: "default" 0.0; @@ -89,7 +89,7 @@ { text: "30"; font: "Vera Bold"; - size: 12; + size: 10; min: 1 1; align: 0.5 0.5; text_class: "module_large"; @@ -100,8 +100,8 @@ { name: "location"; type: TEXT; - clip_to: "base"; - effect: SOFT_SHADOW; + effect: OUTLINE_SHADOW; + //clip_to: "base"; mouse_events: 0; description { @@ -124,7 +124,7 @@ { text: "Taunton"; font: "Vera Bold"; - size: 10; + size: 8; min: 1 1; align: 0.5 0.5; text_class: "module_normal"; @@ -140,7 +140,6 @@ { name: "line"; type: RECT; - clip_to: "base"; effect: SOFT_SHADOW; mouse_events: 0; description @@ -172,8 +171,8 @@ { name: "conditions"; type: TEXT; - clip_to: "base"; - effect: SOFT_SHADOW; + effect: OUTLINE_SHADOW; + //clip_to: "base"; mouse_events: 0; description { @@ -196,10 +195,10 @@ { text: "Fair"; font: "Vera Bold"; - size: 12; + size: 8; min: 1 1; align: 0.5 0.5; - text_class: "module_large"; + text_class: "module_normal"; } } description @@ -224,10 +223,10 @@ { text: "Fair"; font: "Vera Bold"; - size: 12; + size: 8; min: 1 1; align: 0.5 0.5; - text_class: "module_large"; + text_class: "module_normal"; } } } ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs