summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShinwoo Kim <kimcinoo.efl@gmail.com>2012-11-26 11:18:04 +0000
committerShinwoo Kim <kimcinoo.efl@gmail.com>2012-11-26 11:18:04 +0000
commit5edfa0a8a8fd2c837b12d2d06c435f07134b1d22 (patch)
tree37019a340f2bc0f409693ee30b918164b001a94c
parent86c72617062f26caeb96f23f542d158e3beb31b7 (diff)
[radio] add smart_activate();
SVN revision: 79696
-rw-r--r--src/lib/elm_radio.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/lib/elm_radio.c b/src/lib/elm_radio.c
index e9a0b558c..4c3930426 100644
--- a/src/lib/elm_radio.c
+++ b/src/lib/elm_radio.c
@@ -72,7 +72,7 @@ _activate(Evas_Object *obj)
72 72
73 if (sd->group->value == sd->value) return; 73 if (sd->group->value == sd->value) return;
74 74
75 if ((_elm_config->access_mode == ELM_ACCESS_MODE_OFF) || 75 if ((!_elm_config->access_mode) ||
76 (_elm_access_2nd_click_timeout(obj))) 76 (_elm_access_2nd_click_timeout(obj)))
77 { 77 {
78 sd->group->value = sd->value; 78 sd->group->value = sd->value;
@@ -80,7 +80,7 @@ _activate(Evas_Object *obj)
80 80
81 _state_set_all(sd); 81 _state_set_all(sd);
82 82
83 if (_elm_config->access_mode != ELM_ACCESS_MODE_OFF) 83 if (_elm_config->access_mode)
84 _elm_access_say(E_("State: On")); 84 _elm_access_say(E_("State: On"));
85 evas_object_smart_callback_call(obj, SIG_CHANGED, NULL); 85 evas_object_smart_callback_call(obj, SIG_CHANGED, NULL);
86 } 86 }
@@ -524,6 +524,20 @@ _elm_radio_smart_focus_direction_manager_is(Eo *obj EINA_UNUSED, void *_pd EINA_
524} 524}
525 525
526static void 526static void
527_elm_radio_smart_activate(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
528{
529 Elm_Activate act = va_arg(*list, Elm_Activate);
530 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
531 if (ret) *ret = EINA_FALSE;
532
533 if (act != ELM_ACTIVATE_DEFAULT) return;
534
535 _activate(obj);
536
537 if (ret) *ret = EINA_TRUE;
538}
539
540static void
527_class_constructor(Eo_Class *klass) 541_class_constructor(Eo_Class *klass)
528{ 542{
529 const Eo_Op_Func_Description func_desc[] = { 543 const Eo_Op_Func_Description func_desc[] = {
@@ -538,6 +552,7 @@ _class_constructor(Eo_Class *klass)
538 EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_EVENT), _elm_radio_smart_event), 552 EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_EVENT), _elm_radio_smart_event),
539 EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_NEXT_MANAGER_IS), _elm_radio_smart_focus_next_manager_is), 553 EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_NEXT_MANAGER_IS), _elm_radio_smart_focus_next_manager_is),
540 EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_DIRECTION_MANAGER_IS), _elm_radio_smart_focus_direction_manager_is), 554 EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_DIRECTION_MANAGER_IS), _elm_radio_smart_focus_direction_manager_is),
555 EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_ACTIVATE), _elm_radio_smart_activate),
541 556
542 EO_OP_FUNC(ELM_OBJ_CONTAINER_ID(ELM_OBJ_CONTAINER_SUB_ID_CONTENT_SET), _elm_radio_smart_content_set), 557 EO_OP_FUNC(ELM_OBJ_CONTAINER_ID(ELM_OBJ_CONTAINER_SUB_ID_CONTENT_SET), _elm_radio_smart_content_set),
543 558