From ef9c5648e1a87b736d3e9dacb6d9004e86e16ae3 Mon Sep 17 00:00:00 2001 From: rephorm Date: Sun, 20 Nov 2005 21:20:09 +0000 Subject: [PATCH] the check theme shouldn't need to track state. emit the proper signals whenever it changes. SVN revision: 18557 --- src/bin/e_widget_check.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/bin/e_widget_check.c b/src/bin/e_widget_check.c index 9b1dd9d..17ad5b3 100644 --- a/src/bin/e_widget_check.c +++ b/src/bin/e_widget_check.c @@ -94,8 +94,16 @@ _e_wid_do(Evas_Object *obj) wd = e_widget_data_get(obj); if (wd->valptr) { - if (*(wd->valptr) == 0) *(wd->valptr) = 1; - else *(wd->valptr) = 0; + if (*(wd->valptr) == 0) + { + *(wd->valptr) = 1; + edje_object_signal_emit(wd->o_check, "toggle_on", ""); + } + else + { + *(wd->valptr) = 0; + edje_object_signal_emit(wd->o_check, "toggle_off", ""); + } } } @@ -106,11 +114,6 @@ _e_wid_activate_hook(Evas_Object *obj) wd = e_widget_data_get(obj); _e_wid_do(obj); - if (wd->valptr) - { - if (*(wd->valptr)) edje_object_signal_emit(wd->o_check, "toggle_on", ""); - else edje_object_signal_emit(wd->o_check, "toggle_off", ""); - } } static void -- 2.7.4