multibuttonentry: Delete duplicate running code.

Summary:
When layout clicked, "elm_widget_on_focus()" called with "entry_focus_in()" callback.
The "view update" and "focus set to entry" already call in those callbacks, so i deleted duplicate code and it also make focus issue when user click the entry to add item.
@fix

Test Plan:
Run elementary_test.

1. excute multibuttonentry.
2. click the entry area.
3. see the elm_widget_on_focus called twice.
   (layout callback function called view update -> elm_box_unpack called in view update ->
    entry lose focus -> on_focus_callback call again)

Reviewers: Hermet, seoz, Jaehyun_Cho, JackDanielZ

Differential Revision: https://phab.enlightenment.org/D1902
This commit is contained in:
woochan lee 2015-02-03 11:38:21 +09:00 committed by ChunEon Park
parent 82f1aebd01
commit 6e8f8629aa
1 changed files with 2 additions and 12 deletions

View File

@ -881,21 +881,11 @@ _elm_multibuttonentry_elm_layout_sizing_eval(Eo *obj, Elm_Multibuttonentry_Data
}
static void
_mouse_clicked_signal_cb(void *data,
_mouse_clicked_signal_cb(void *data EINA_UNUSED,
Evas_Object *obj,
const char *emission EINA_UNUSED,
const char *source EINA_UNUSED)
{
Elm_Multibuttonentry_Data *sd = data;
_view_update(sd);
if (elm_widget_focus_get(obj) && sd->editable)
{
elm_entry_input_panel_show(sd->entry);
elm_object_focus_set(sd->entry, EINA_TRUE);
}
evas_object_smart_callback_call(obj, SIG_CLICKED, NULL);
}
@ -1071,7 +1061,7 @@ _callbacks_register(Evas_Object *obj)
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
elm_layout_signal_callback_add
(obj, "mouse,clicked,1", "*", _mouse_clicked_signal_cb, sd);
(obj, "mouse,clicked,1", "*", _mouse_clicked_signal_cb, NULL);
evas_object_event_callback_add
(wd->resize_obj, EVAS_CALLBACK_KEY_DOWN,