forked from enlightenment/enlightenment
parent
7807c8a61c
commit
e0f12c3ab9
|
@ -54,7 +54,8 @@ e_widget_button_add(Evas *evas, const char *label, const char *icon, void (*func
|
||||||
wd->o_button = o;
|
wd->o_button = o;
|
||||||
e_theme_edje_object_set(o, "base/theme/widgets",
|
e_theme_edje_object_set(o, "base/theme/widgets",
|
||||||
"e/widgets/button");
|
"e/widgets/button");
|
||||||
edje_object_signal_callback_add(o, "e,action,click", "", _e_wid_signal_cb1, obj);
|
edje_object_signal_callback_add(o, "e,action,click", "",
|
||||||
|
_e_wid_signal_cb1, obj);
|
||||||
if (label && label[0] != 0)
|
if (label && label[0] != 0)
|
||||||
{
|
{
|
||||||
edje_object_part_text_set(o, "e.text.label", label);
|
edje_object_part_text_set(o, "e.text.label", label);
|
||||||
|
@ -63,7 +64,8 @@ e_widget_button_add(Evas *evas, const char *label, const char *icon, void (*func
|
||||||
evas_object_show(o);
|
evas_object_show(o);
|
||||||
|
|
||||||
e_widget_sub_object_add(obj, o);
|
e_widget_sub_object_add(obj, o);
|
||||||
evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN, _e_wid_focus_steal, obj);
|
evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN,
|
||||||
|
_e_wid_focus_steal, obj);
|
||||||
e_widget_resize_object_set(obj, o);
|
e_widget_resize_object_set(obj, o);
|
||||||
|
|
||||||
if (icon)
|
if (icon)
|
||||||
|
@ -180,7 +182,7 @@ _e_wid_signal_cb1(void *data, Evas_Object *obj, const char *emission, const char
|
||||||
Evas_Object *wid;
|
Evas_Object *wid;
|
||||||
|
|
||||||
wid = data;
|
wid = data;
|
||||||
if (!wid || e_widget_disabled_get(wid)) return;
|
if ((!wid) || (e_widget_disabled_get(wid))) return;
|
||||||
e_widget_focus_steal(wid);
|
e_widget_focus_steal(wid);
|
||||||
e_widget_change(wid);
|
e_widget_change(wid);
|
||||||
_e_wid_activate_hook(wid);
|
_e_wid_activate_hook(wid);
|
||||||
|
@ -199,17 +201,11 @@ _e_wid_button_state_send(E_Widget_Data *wd)
|
||||||
if (wd->type & E_WIDGET_BUTTON_TEXT)
|
if (wd->type & E_WIDGET_BUTTON_TEXT)
|
||||||
{
|
{
|
||||||
if (wd->type & E_WIDGET_BUTTON_ICON)
|
if (wd->type & E_WIDGET_BUTTON_ICON)
|
||||||
{
|
|
||||||
edje_object_signal_emit(wd->o_button, "e,state,combo", "e");
|
edje_object_signal_emit(wd->o_button, "e,state,combo", "e");
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
edje_object_signal_emit(wd->o_button, "e,state,text", "e");
|
edje_object_signal_emit(wd->o_button, "e,state,text", "e");
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (wd->type & E_WIDGET_BUTTON_ICON)
|
else if (wd->type & E_WIDGET_BUTTON_ICON)
|
||||||
{
|
edje_object_signal_emit(wd->o_button, "e,state,icon", "e");
|
||||||
edje_object_signal_emit(wd->o_button, "e,state,icon", "e");
|
|
||||||
}
|
|
||||||
edje_object_message_signal_process(wd->o_button);
|
edje_object_message_signal_process(wd->o_button);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue