Hi all,
I'm here again asking some tips =). I've a problem with this warning
"evas_object_smart_need_recalculate_set() Object 0x170c024 is not stable
during recalc loop". I know what is the problem, but I don't know how I can
fix it =/. I'm developing an IP phone, and during a established call I've a
counter time, to time the duration of the call and all the time I update it
(each second).
Because this counter time, appears a lot of warning to me, and sometimes my
counter time changes the position in my screen =), like a sliding!
Actually, I would like a tip, How is the better way to do this counter time?
Why my counter time is sliding in my screen?
Bellow, there is an example!
/* SET Counter Time */
void
tg_call_window_set_duration(TgCallWindow *win, double duration)
{
char* str_duration = tg_util_get_duration(duration);
if (!win) {
EINA_LOG_ERR("win is NULL");
return;
}
elm_object_text_part_set(win->layout, "elm.text.duration",
str_duration);
free(str_duration);
}
/* START Counter Time */
void
tg_call_control_start_duration()
{
tg_call_control_stop_duration();
time(&start_duration);
stop_duration = start_duration;
tg_call_window_set_duration(window, 0);
update_duration_timer = ecore_timer_add(1.0, _update_duration_cb, NULL);
}
/* Callback */
static Eina_Bool
_update_duration_cb(void *data)
{
UNUSED(data);
double duration = tg_call_control_get_duration();
if (!window) {
EINA_LOG_ERR("window is NULL");
return EINA_FALSE;
}
tg_call_window_set_duration(window, duration);
return EINA_TRUE;
}
/* GET duration */
char *
tg_util_get_duration(double duration)
{
int hours, minutes, seconds;
char buf[11];
hours = (int) (duration / 3600.0);
duration -= hours * 3600;
minutes = (int) (duration / 60);
duration -= minutes * 60;
seconds = duration;
snprintf(buf, sizeof(buf), "%02d:%02d:%02d", hours, minutes, seconds);
return strdup(buf);
}
/* EDC part */
part { name: "elm.text.duration";
type: TEXT;
effect: SHADOW;
description {
state: "default" 0.0;
text {
font: "normal";
size: 15;
text: "00:00:00";
}
align: 0.0 0.0;
color: 254 254 254 255;
rel1.to: "called_off";
rel1.offset: -20 23;
}
}
Regards,
--
Paulo Leonardo Benatto, patito
"the fear of being free, makes you proud of being a slave"
------------------------------------------------------------------------------
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of
discussion for anyone considering optimizing the pricing and packaging model
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel