multibuttonentry: Delete duplicate running code.
authorwoochan lee <wc0917.lee@samsung.com>
Tue, 3 Feb 2015 02:38:21 +0000 (11:38 +0900)
committerChunEon Park <hermet@hermet.pe.kr>
Tue, 3 Feb 2015 02:38:21 +0000 (11:38 +0900)
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

src/lib/elc_multibuttonentry.c

index 51d1d74..d53f44b 100644 (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,