summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_spin_button.c
diff options
context:
space:
mode:
authorWoochan Lee <wc0917.lee@samsung.com>2017-11-30 16:52:42 +0900
committerSungtaek Hong <sth253.hong@samsung.com>2017-12-08 16:02:23 +0900
commit1588b8be0a0a14daea5cbc0c113d2770b8cc6f25 (patch)
tree3f31f6ad1ea19ad898f24f58e918a4f54e304f6c /src/lib/elementary/efl_ui_spin_button.c
parent5e4abdb873ac4f678531b4d1020b7381a88383ff (diff)
efl_ui_spin_button: Replace legacy widgets to efl ui widgets.
Summary: elm_button -> efl_ui_button class. elm_entry will be changed after filter feature added. Reviewers: Jaehyun_Cho, jpeg, woohyun Reviewed By: Jaehyun_Cho Subscribers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D5555
Diffstat (limited to 'src/lib/elementary/efl_ui_spin_button.c')
-rw-r--r--src/lib/elementary/efl_ui_spin_button.c47
1 files changed, 20 insertions, 27 deletions
diff --git a/src/lib/elementary/efl_ui_spin_button.c b/src/lib/elementary/efl_ui_spin_button.c
index ae4eeaa..eaf4743 100644
--- a/src/lib/elementary/efl_ui_spin_button.c
+++ b/src/lib/elementary/efl_ui_spin_button.c
@@ -352,6 +352,9 @@ _toggle_entry(Evas_Object *obj)
352 { 352 {
353 if (!sd->ent) 353 if (!sd->ent)
354 { 354 {
355 //FIXME: elm_entry will be changed to efl_ui_text after
356 // filter feature implemented.
357 // (Current efl_ui_text has missed filter feature.)
355 sd->ent = elm_entry_add(obj); 358 sd->ent = elm_entry_add(obj);
356 Eina_Strbuf *buf = eina_strbuf_new(); 359 Eina_Strbuf *buf = eina_strbuf_new();
357 eina_strbuf_append_printf(buf, "spinner/%s", elm_widget_style_get(obj)); 360 eina_strbuf_append_printf(buf, "spinner/%s", elm_widget_style_get(obj));
@@ -771,33 +774,23 @@ _efl_ui_spin_button_efl_object_finalize(Eo *obj, Efl_Ui_Spin_Button_Data *sd)
771 elm_widget_style_get(obj))) 774 elm_widget_style_get(obj)))
772 CRI("Failed to set layout!"); 775 CRI("Failed to set layout!");
773 776
774 sd->inc_button = elm_button_add(obj); 777 sd->inc_button = efl_add(EFL_UI_BUTTON_CLASS, obj,
775 elm_object_style_set(sd->inc_button, "spinner/increase/default"); 778 efl_ui_widget_style_set(efl_added, "spinner/increase/default"),
776 779 efl_event_callback_array_add(efl_added, _inc_dec_button_cb(), obj),
777 efl_event_callback_array_add(sd->inc_button, _inc_dec_button_cb(), obj); 780 efl_content_set(efl_part(obj, "elm.swallow.inc_button"), efl_added));
778 781
779 elm_layout_content_set(obj, "elm.swallow.inc_button", sd->inc_button); 782 sd->text_button = efl_add(EFL_UI_BUTTON_CLASS, obj,
780 elm_widget_sub_object_add(obj, sd->inc_button); 783 efl_ui_widget_style_set(efl_added, "spinner/default"),
781 784 efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED,
782 sd->text_button = elm_button_add(obj); 785 _text_button_clicked_cb, obj),
783 elm_object_style_set(sd->text_button, "spinner/default"); 786 efl_event_callback_add(efl_added, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED,
784 787 _text_button_focus_changed_cb, obj),
785 efl_event_callback_add(sd->text_button, EFL_UI_EVENT_CLICKED, 788 efl_content_set(efl_part(obj, "elm.swallow.text_button"), efl_added));
786 _text_button_clicked_cb, obj); 789
787 efl_event_callback_add(sd->text_button, 790 sd->dec_button = efl_add(EFL_UI_BUTTON_CLASS, obj,
788 EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED, 791 efl_ui_widget_style_set(efl_added, "spinner/decrease/default"),
789 _text_button_focus_changed_cb, obj); 792 efl_event_callback_array_add(efl_added, _inc_dec_button_cb(), obj),
790 793 efl_content_set(efl_part(obj, "elm.swallow.dec_button"), efl_added));
791 elm_layout_content_set(obj, "elm.swallow.text_button", sd->text_button);
792 elm_widget_sub_object_add(obj, sd->text_button);
793
794 sd->dec_button = elm_button_add(obj);
795 elm_object_style_set(sd->dec_button, "spinner/decrease/default");
796
797 efl_event_callback_array_add(sd->dec_button, _inc_dec_button_cb(), obj);
798
799 elm_layout_content_set(obj, "elm.swallow.dec_button", sd->dec_button);
800 elm_widget_sub_object_add(obj, sd->dec_button);
801 794
802 { 795 {
803 Eina_List *items = NULL; 796 Eina_List *items = NULL;