# HG changeset patch # User wycc # Date 1236407120 -28800 # Node ID 995eb2c1a1aa5dc5971dfbcfddf672085e35a139 # Parent 01038b8d8f05849d9309713009e513085b6db626# Parent 02e457d374f56ce13281fe708697f0a4519d2de1 Merge diff -r 02e457d374f5 -r 995eb2c1a1aa src/mbaf/mbbutton.c --- a/src/mbaf/mbbutton.c Sat Mar 07 11:03:18 2009 +0800 +++ b/src/mbaf/mbbutton.c Sat Mar 07 14:25:20 2009 +0800 @@ -56,6 +56,14 @@ mb_button_refresh(btn); } +static void mb_button_end_animated_cb(event_t *evt, void *arg) +{ + mb_button_t *btn = (mb_button_t *) arg; + + btn->progm = NULL; + +} + static void mb_button_pressed(event_t *evt, void *arg) { mb_button_t *btn = (mb_button_t *) arg; @@ -80,6 +88,7 @@ mb_visibility_new(VIS_HIDDEN, btn->click, word); mb_visibility_new(VIS_VISIBLE, btn->active, word); mb_progm_free_completed(progm); + subject_add_observer(mb_progm_get_complete(btn->progm), mb_button_end_animated_cb,btn); get_now(&now); printf("rt = %x\n", btn->rdman->rt); mb_progm_start(progm, X_MB_tman(btn->rdman->rt), &now);