From: Enlightenment S. <no-...@en...> - 2010-06-07 14:19:48
|
Log: oops-- Setting timer handle to NULL when canceling cb function =/ Author: bdilly Date: 2010-06-07 07:19:38 -0700 (Mon, 07 Jun 2010) New Revision: 49554 Modified: trunk/TMP/st/elementary/src/lib/elm_clock.c Modified: trunk/TMP/st/elementary/src/lib/elm_clock.c =================================================================== --- trunk/TMP/st/elementary/src/lib/elm_clock.c 2010-06-07 13:43:07 UTC (rev 49553) +++ trunk/TMP/st/elementary/src/lib/elm_clock.c 2010-06-07 14:19:38 UTC (rev 49554) @@ -115,9 +115,9 @@ _signal_clock_val_up(void *data) { Widget_Data *wd = elm_widget_data_get(data); - if (!wd) return ECORE_CALLBACK_CANCEL; - if (!wd->edit) return ECORE_CALLBACK_CANCEL; - if (!wd->sel_obj) return ECORE_CALLBACK_CANCEL; + if (!wd) goto clock_val_up_cancel; + if (!wd->edit) goto clock_val_up_cancel; + if (!wd->sel_obj) goto clock_val_up_cancel; if (wd->sel_obj == wd->digit[0]) { wd->hrs = wd->hrs + 10; @@ -158,15 +158,18 @@ _time_update(data); evas_object_smart_callback_call(data, "changed", NULL); return ECORE_CALLBACK_RENEW; +clock_val_up_cancel: + wd->spin = NULL; + return ECORE_CALLBACK_CANCEL; } static int _signal_clock_val_down(void *data) { Widget_Data *wd = elm_widget_data_get(data); - if (!wd) return ECORE_CALLBACK_CANCEL; - if (!wd->edit) return ECORE_CALLBACK_CANCEL; - if (!wd->sel_obj) return ECORE_CALLBACK_CANCEL; + if (!wd) goto clock_val_down_cancel; + if (!wd->edit) goto clock_val_down_cancel; + if (!wd->sel_obj) goto clock_val_down_cancel; if (wd->sel_obj == wd->digit[0]) { wd->hrs = wd->hrs - 10; @@ -207,6 +210,9 @@ _time_update(data); evas_object_smart_callback_call(data, "changed", NULL); return ECORE_CALLBACK_RENEW; +clock_val_down_cancel: + wd->spin = NULL; + return ECORE_CALLBACK_CANCEL; } static void |