forked from enlightenment/efl
Changing internal name from chk to radio
chk is used to check. By: Fabiano Fidencio <fidencio@profusion.mobi> SVN revision: 49704
This commit is contained in:
parent
3b77b92e53
commit
dea0075e7e
|
@ -42,7 +42,7 @@ struct _Group
|
|||
|
||||
struct _Widget_Data
|
||||
{
|
||||
Evas_Object *chk;
|
||||
Evas_Object *radio;
|
||||
Evas_Object *icon;
|
||||
int value;
|
||||
const char *label;
|
||||
|
@ -83,22 +83,22 @@ _theme_hook(Evas_Object *obj)
|
|||
{
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
if (!wd) return;
|
||||
_elm_theme_object_set(obj, wd->chk, "radio", "base", elm_widget_style_get(obj));
|
||||
_elm_theme_object_set(obj, wd->radio, "radio", "base", elm_widget_style_get(obj));
|
||||
if (wd->icon)
|
||||
edje_object_signal_emit(wd->chk, "elm,state,icon,visible", "elm");
|
||||
edje_object_signal_emit(wd->radio, "elm,state,icon,visible", "elm");
|
||||
else
|
||||
edje_object_signal_emit(wd->chk, "elm,state,icon,hidden", "elm");
|
||||
edje_object_signal_emit(wd->radio, "elm,state,icon,hidden", "elm");
|
||||
if (wd->state)
|
||||
edje_object_signal_emit(wd->chk, "elm,state,radio,on", "elm");
|
||||
edje_object_signal_emit(wd->radio, "elm,state,radio,on", "elm");
|
||||
else
|
||||
edje_object_signal_emit(wd->chk, "elm,state,radio,off", "elm");
|
||||
edje_object_signal_emit(wd->radio, "elm,state,radio,off", "elm");
|
||||
if (wd->label)
|
||||
edje_object_signal_emit(wd->chk, "elm,state,text,visible", "elm");
|
||||
edje_object_signal_emit(wd->radio, "elm,state,text,visible", "elm");
|
||||
else
|
||||
edje_object_signal_emit(wd->chk, "elm,state,text,hidden", "elm");
|
||||
edje_object_part_text_set(wd->chk, "elm.text", wd->label);
|
||||
edje_object_message_signal_process(wd->chk);
|
||||
edje_object_scale_set(wd->chk, elm_widget_scale_get(obj) * _elm_config->scale);
|
||||
edje_object_signal_emit(wd->radio, "elm,state,text,hidden", "elm");
|
||||
edje_object_part_text_set(wd->radio, "elm.text", wd->label);
|
||||
edje_object_message_signal_process(wd->radio);
|
||||
edje_object_scale_set(wd->radio, elm_widget_scale_get(obj) * _elm_config->scale);
|
||||
_sizing_eval(obj);
|
||||
}
|
||||
|
||||
|
@ -109,11 +109,11 @@ _disable_hook(Evas_Object *obj)
|
|||
if (!wd) return;
|
||||
if (elm_widget_disabled_get(obj))
|
||||
{
|
||||
edje_object_signal_emit(wd->chk, "elm,state,disabled", "elm");
|
||||
edje_object_signal_emit(wd->radio, "elm,state,disabled", "elm");
|
||||
if (wd->state) _state_set(obj, 0);
|
||||
}
|
||||
else
|
||||
edje_object_signal_emit(wd->chk, "elm,state,enabled", "elm");
|
||||
edje_object_signal_emit(wd->radio, "elm,state,enabled", "elm");
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -123,7 +123,7 @@ _sizing_eval(Evas_Object *obj)
|
|||
Evas_Coord minw = -1, minh = -1;
|
||||
if (!wd) return;
|
||||
elm_coords_finger_size_adjust(1, &minw, 1, &minh);
|
||||
edje_object_size_min_restricted_calc(wd->chk, &minw, &minh, minw, minh);
|
||||
edje_object_size_min_restricted_calc(wd->radio, &minw, &minh, minw, minh);
|
||||
elm_coords_finger_size_adjust(1, &minw, 1, &minh);
|
||||
evas_object_size_hint_min_set(obj, minw, minh);
|
||||
evas_object_size_hint_max_set(obj, -1, -1);
|
||||
|
@ -146,7 +146,7 @@ _sub_del(void *data __UNUSED__, Evas_Object *obj, void *event_info)
|
|||
if (!wd) return;
|
||||
if (sub == wd->icon)
|
||||
{
|
||||
edje_object_signal_emit(wd->chk, "elm,state,icon,hidden", "elm");
|
||||
edje_object_signal_emit(wd->radio, "elm,state,icon,hidden", "elm");
|
||||
evas_object_event_callback_del_full
|
||||
(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints, obj);
|
||||
wd->icon = NULL;
|
||||
|
@ -163,9 +163,9 @@ _state_set(Evas_Object *obj, Eina_Bool state)
|
|||
{
|
||||
wd->state = state;
|
||||
if (wd->state)
|
||||
edje_object_signal_emit(wd->chk, "elm,state,radio,on", "elm");
|
||||
edje_object_signal_emit(wd->radio, "elm,state,radio,on", "elm");
|
||||
else
|
||||
edje_object_signal_emit(wd->chk, "elm,state,radio,off", "elm");
|
||||
edje_object_signal_emit(wd->radio, "elm,state,radio,off", "elm");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -227,11 +227,11 @@ elm_radio_add(Evas_Object *parent)
|
|||
elm_widget_theme_hook_set(obj, _theme_hook);
|
||||
elm_widget_disable_hook_set(obj, _disable_hook);
|
||||
|
||||
wd->chk = edje_object_add(e);
|
||||
_elm_theme_object_set(obj, wd->chk, "radio", "base", "default");
|
||||
edje_object_signal_callback_add(wd->chk, "elm,action,radio,on", "", _signal_radio_on, obj);
|
||||
edje_object_signal_callback_add(wd->chk, "elm,action,radio,toggle", "", _signal_radio_on, obj);
|
||||
elm_widget_resize_object_set(obj, wd->chk);
|
||||
wd->radio = edje_object_add(e);
|
||||
_elm_theme_object_set(obj, wd->radio, "radio", "base", "default");
|
||||
edje_object_signal_callback_add(wd->radio, "elm,action,radio,on", "", _signal_radio_on, obj);
|
||||
edje_object_signal_callback_add(wd->radio, "elm,action,radio,toggle", "", _signal_radio_on, obj);
|
||||
elm_widget_resize_object_set(obj, wd->radio);
|
||||
|
||||
evas_object_smart_callback_add(obj, "sub-object-del", _sub_del, obj);
|
||||
|
||||
|
@ -264,15 +264,15 @@ elm_radio_label_set(Evas_Object *obj, const char *label)
|
|||
eina_stringshare_replace(&wd->label, label);
|
||||
if (label)
|
||||
{
|
||||
edje_object_signal_emit(wd->chk, "elm,state,text,visible", "elm");
|
||||
edje_object_message_signal_process(wd->chk);
|
||||
edje_object_signal_emit(wd->radio, "elm,state,text,visible", "elm");
|
||||
edje_object_message_signal_process(wd->radio);
|
||||
}
|
||||
else
|
||||
{
|
||||
edje_object_signal_emit(wd->chk, "elm,state,text,hidden", "elm");
|
||||
edje_object_message_signal_process(wd->chk);
|
||||
edje_object_signal_emit(wd->radio, "elm,state,text,hidden", "elm");
|
||||
edje_object_message_signal_process(wd->radio);
|
||||
}
|
||||
edje_object_part_text_set(wd->chk, "elm.text", label);
|
||||
edje_object_part_text_set(wd->radio, "elm.text", label);
|
||||
_sizing_eval(obj);
|
||||
}
|
||||
|
||||
|
@ -320,8 +320,8 @@ elm_radio_icon_set(Evas_Object *obj, Evas_Object *icon)
|
|||
elm_widget_sub_object_add(obj, icon);
|
||||
evas_object_event_callback_add(icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
||||
_changed_size_hints, obj);
|
||||
edje_object_part_swallow(wd->chk, "elm.swallow.content", icon);
|
||||
edje_object_signal_emit(wd->chk, "elm,state,icon,visible", "elm");
|
||||
edje_object_part_swallow(wd->radio, "elm.swallow.content", icon);
|
||||
edje_object_signal_emit(wd->radio, "elm,state,icon,visible", "elm");
|
||||
_sizing_eval(obj);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue