the check theme shouldn't need to track state. emit the proper signals whenever it...
authorrephorm <rephorm>
Sun, 20 Nov 2005 21:20:09 +0000 (21:20 +0000)
committerrephorm <rephorm@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 20 Nov 2005 21:20:09 +0000 (21:20 +0000)
SVN revision: 18557

src/bin/e_widget_check.c

index 9b1dd9d..17ad5b3 100644 (file)
@@ -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