Enlightenment CVS committal
Author : jeffdameth
Project : e_modules
Module : forecasts
Dir : e_modules/forecasts
Modified Files:
e_mod_main.c
Log Message:
forcast fix:
- initialize inst->popup with NULL
- only update popup when necessary
===================================================================
RCS file: /cvs/e/e_modules/forecasts/e_mod_main.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- e_mod_main.c 21 Dec 2007 23:06:52 -0000 1.16
+++ e_mod_main.c 6 Jan 2008 23:03:09 -0000 1.17
@@ -150,11 +150,12 @@
w = _forecasts_new(gc->evas);
w->inst = inst;
inst->forecasts = w;
-
+
o = w->forecasts_obj;
gcc = e_gadcon_client_new(gc, name, id, style, o);
gcc->data = inst;
inst->gcc = gcc;
+ inst->popup = NULL;
inst->forecasts_obj = o;
evas_object_event_callback_add(inst->forecasts_obj,
EVAS_CALLBACK_MOUSE_DOWN,
_cb_mouse_down, inst);
@@ -885,7 +886,9 @@
edje_object_part_text_set(inst->forecasts->forecasts_obj, "e.text.temp",
buf);
edje_object_part_text_set(inst->forecasts->forecasts_obj,
"e.text.description",
inst->condition.desc);
- _forecasts_popup_content_create(inst);
+
+ if (inst->popup) _forecasts_popup_destroy(inst);
+ inst->popup = NULL;
}
void
@@ -910,7 +913,9 @@
if (inst->area) evas_stringshare_del(inst->area);
inst->area = evas_stringshare_add(inst->ci->code);
_forecasts_converter(inst);
- _forecasts_popup_content_create(inst);
+
+ if (inst->popup) _forecasts_popup_destroy(inst);
+ inst->popup = NULL;
snprintf(buf, sizeof(buf), "%d°%c", inst->condition.temp,
inst->units.temp);
edje_object_part_text_set(inst->forecasts->forecasts_obj,
"e.text.temp", buf);
@@ -941,7 +946,6 @@
int row = 0, i;
int w, h;
- if (inst->popup) _forecasts_popup_destroy(inst);
inst->popup = e_gadcon_popup_new(inst->gcc, _forecasts_popup_resize);
evas = inst->popup->win->evas;
@@ -1078,8 +1082,10 @@
Evas_Event_Mouse_Down *ev;
if (!(inst = data)) return;
+
if (!inst->ci->popup_on_hover)
{
+ if (!inst->popup) _forecasts_popup_content_create(inst);
e_gadcon_popup_show(inst->popup);
return;
}
@@ -1099,6 +1105,7 @@
if (!(inst = data)) return;
if (!inst->ci->popup_on_hover) return;
+ if (!inst->popup) _forecasts_popup_content_create(inst);
e_gadcon_popup_show(inst->popup);
}
-------------------------------------------------------------------------
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