check widget disable list functions now apply disabled state on adding new items
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Wed, 6 Feb 2013 09:09:07 +0000 (09:09 +0000)
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Wed, 6 Feb 2013 09:09:07 +0000 (09:09 +0000)
SVN revision: 83665

src/bin/e_widget_check.c
src/modules/conf_window_manipulation/e_int_config_focus.c

index d818db0..a3dc8d0 100644 (file)
@@ -245,6 +245,8 @@ e_widget_check_widget_disable_on_checked_add(Evas_Object *check, Evas_Object *ob
    EINA_SAFETY_ON_NULL_RETURN(obj);
    wd = e_widget_data_get(check);
    EINA_SAFETY_ON_NULL_RETURN(wd);
+   if (wd->valptr)
+     e_widget_disabled_set(obj, *wd->valptr);
    evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL, _extern_obj_enable_del, wd);
    wd->widgets_enable = eina_list_append(wd->widgets_enable, obj);
 }
@@ -263,6 +265,8 @@ e_widget_check_widget_disable_on_unchecked_add(Evas_Object *check, Evas_Object *
    EINA_SAFETY_ON_NULL_RETURN(obj);
    wd = e_widget_data_get(check);
    EINA_SAFETY_ON_NULL_RETURN(wd);
+   if (wd->valptr)
+     e_widget_disabled_set(obj, !(*wd->valptr));
    evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL, _extern_obj_disable_del, wd);
    wd->widgets_disable = eina_list_append(wd->widgets_disable, obj);
 }
index 4eacbd0..403c93a 100644 (file)
@@ -345,16 +345,13 @@ _advanced_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Da
    ob = e_widget_check_add(evas, _("Slide pointer to a new window which is focused"), 
                            &(cfdata->pointer_slide));
    e_widget_framelist_object_append(of, ob);
-   e_widget_disabled_set(ob, cfdata->disable_all_pointer_warps);
    e_widget_check_widget_disable_on_checked_add(obp, ob);
 
    ob = e_widget_label_add(evas, _("Warp speed"));
    e_widget_check_widget_disable_on_checked_add(obp, ob);
-   e_widget_disabled_set(ob, cfdata->disable_all_pointer_warps);
    e_widget_framelist_object_append(of, ob);
    ob = e_widget_slider_add(evas, 1, 0, _("%1.2f"), 0.0, 1.0, 0.01, 0,
                             &(cfdata->pointer_warp_speed), NULL, 100);
-   e_widget_disabled_set(ob, cfdata->disable_all_pointer_warps);
    e_widget_check_widget_disable_on_checked_add(obp, ob);
    e_widget_framelist_object_append(of, ob);
    e_widget_list_object_append(ol, of, 1, 0, 0.5);