Elementary migration revision 70375
[framework/uifw/elementary.git] / src / lib / elc_multibuttonentry.c
index c9ab83c..0eb9a59 100644 (file)
@@ -270,6 +270,7 @@ _signal_mouse_clicked(void *data, Evas_Object *obj __UNUSED__, const char *emiss
    _view_update(data);
 
    elm_entry_input_panel_show(wd->entry);
+   elm_object_focus_set(wd->entry, EINA_TRUE);
 
    evas_object_smart_callback_call(data, SIG_CLICKED, NULL);
 }
@@ -703,7 +704,7 @@ _button_clicked(void *data, Evas_Object *obj, const char *emission __UNUSED__, c
    Elm_Multibuttonentry_Item *item = NULL;
    if (!wd || wd->view_state == MULTIBUTTONENTRY_VIEW_SHRINK) return;
 
-   _change_current_button(data, obj);
+   _select_button(data, obj);
 
    if (wd->selected_it)
      if ((item = (Elm_Multibuttonentry_Item *)wd->selected_it) != NULL)
@@ -1115,17 +1116,14 @@ static void
 _entry_resized_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
 {
    Evas_Coord en_x, en_y, en_w, en_h;
-   Evas_Coord bx_x, bx_y;
 
    Widget_Data *wd = elm_widget_data_get(data);
    if (!wd) return;
 
    evas_object_geometry_get(wd->entry, &en_x, &en_y, &en_w, &en_h);
-   evas_object_geometry_get(wd->box, &bx_x, &bx_y, NULL, NULL);
 
    if (wd->focused)
-     elm_widget_show_region_set(wd->box, en_x - bx_x, en_y - bx_y, en_w,
-                                en_h, EINA_TRUE);
+     elm_widget_show_region_set(wd->entry, en_x, en_y, en_w, en_h, EINA_TRUE);
 }
 
 static void
@@ -1157,6 +1155,7 @@ _view_init(Evas_Object *obj)
      {
         wd->entry = elm_entry_add(obj);
         if (!wd->entry) return;
+        elm_entry_scrollable_set(wd->entry, EINA_TRUE);
         elm_entry_single_line_set(wd->entry, EINA_TRUE);
         elm_object_text_set(wd->entry, "");
         elm_entry_input_panel_enabled_set(wd->entry, EINA_FALSE);
@@ -1226,6 +1225,9 @@ _calculate_box_min_size(Evas_Object *box, Evas_Object_Box_Data *priv)
 
         if (wx)
           {
+             if ((elm_widget_is(opt->obj)) && (!(strcmp(elm_widget_type_get(opt->obj), "entry"))) && (mnw == -1))
+               mnw = MIN_W_ENTRY;
+
              if (mnw != -1 && (w - cw) >= mnw)
                ww = w - cw;
              else
@@ -1267,6 +1269,9 @@ _calculate_item_max_height(Evas_Object *box, Evas_Object_Box_Data *priv, int obj
 
         if (wx)
           {
+             if ((elm_widget_is(opt->obj)) && (!(strcmp(elm_widget_type_get(opt->obj), "entry"))) && (mnw == -1))
+               mnw = MIN_W_ENTRY;
+
              if (mnw != -1 && (w - cw) >= mnw)
                 ww = w - cw;
              else
@@ -1341,6 +1346,9 @@ _box_layout_cb(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__
 
         if (wx)
           {
+             if ((elm_widget_is(obj)) && (!(strcmp(elm_widget_type_get(obj), "entry"))) && (mnw == -1))
+               mnw = MIN_W_ENTRY;
+
              if (mnw != -1 && (w - cw) >= mnw)
                 ww = w - cw;
              else