forked from enlightenment/efl
From: Jihyeon Seol <jihyeon.seol@samsung.com>
Subject: [E-devel] [Patch] multibuttonentry - data corruption issue of the box list here is a problem in the data corruption of the box list in _box_layout_cb() of the multibuttonentry. EINA_LIST_FOREACH is used to move and resize the objects. but if box unpack/pack is called in the EINA_LIST_FOREACH loop, the data of the box list will be corrupted. This problem can not be solved immediately due to the structural problems of the MBE. So the attached patch, a workaround, avoids calling unpack/pack in the EINA_LIST_FOREACH loop. I am in the process of refactoring MBE but in the mean time, this patch will resolve the above issue. SVN revision: 77192
This commit is contained in:
parent
e181297a20
commit
ca35233c07
|
@ -547,3 +547,7 @@
|
|||
|
||||
* Fix disk selector selection of middle item when obj not at 0.
|
||||
|
||||
2012-09-28 Jihyeon Seol
|
||||
|
||||
* Fix list corruption issue in multibuttonentry.
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@ Fixes:
|
|||
* Fix bubble info field set.
|
||||
* Escape theme filename correctly.
|
||||
* Fix diskselector selection of middle item.
|
||||
* Fix multibuttonentry list corruption.
|
||||
|
||||
Removals:
|
||||
|
||||
|
|
|
@ -315,7 +315,8 @@ _view_update(Evas_Object *obj)
|
|||
_shrink_mode_set(obj, EINA_TRUE);
|
||||
|
||||
// update guidetext
|
||||
_visual_guide_text_set(obj);
|
||||
if (sd->guide_text_vis_enable)
|
||||
_visual_guide_text_set(obj);
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
|
@ -1171,7 +1172,7 @@ _item_max_height_calculate(Evas_Object *box,
|
|||
static void
|
||||
_box_layout_cb(Evas_Object *o,
|
||||
Evas_Object_Box_Data *priv,
|
||||
void *data __UNUSED__)
|
||||
void *data)
|
||||
{
|
||||
Evas_Coord cw = 0, ch = 0, cmaxh = 0, obj_index = 0;
|
||||
Evas_Coord x, y, w, h, xx, yy;
|
||||
|
@ -1180,7 +1181,9 @@ _box_layout_cb(Evas_Object *o,
|
|||
const Eina_List *l;
|
||||
Evas_Object *obj;
|
||||
double ax, ay;
|
||||
|
||||
|
||||
ELM_MULTIBUTTONENTRY_DATA_GET(data, sd);
|
||||
|
||||
_box_min_size_calculate(o, priv);
|
||||
|
||||
evas_object_geometry_get(o, &x, &y, &w, &h);
|
||||
|
@ -1201,6 +1204,8 @@ _box_layout_cb(Evas_Object *o,
|
|||
xx = x;
|
||||
yy = y;
|
||||
|
||||
sd->guide_text_vis_enable = EINA_FALSE;
|
||||
|
||||
EINA_LIST_FOREACH (priv->children, l, opt)
|
||||
{
|
||||
Evas_Coord mnw, mnh, mxw, mxh;
|
||||
|
@ -1251,6 +1256,7 @@ _box_layout_cb(Evas_Object *o,
|
|||
|
||||
obj_index++;
|
||||
}
|
||||
sd->guide_text_vis_enable = EINA_TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1263,7 +1269,7 @@ _view_init(Evas_Object *obj)
|
|||
sd->box = elm_box_add(obj);
|
||||
|
||||
if (!sd->box) return;
|
||||
elm_box_layout_set(sd->box, _box_layout_cb, NULL, NULL);
|
||||
elm_box_layout_set(sd->box, _box_layout_cb, obj, NULL);
|
||||
elm_box_homogeneous_set(sd->box, EINA_FALSE);
|
||||
elm_layout_content_set(obj, "box.swallow", sd->box);
|
||||
|
||||
|
@ -1377,6 +1383,7 @@ _elm_multibuttonentry_smart_add(Evas_Object *obj)
|
|||
priv->add_callback = NULL;
|
||||
priv->add_callback_data = NULL;
|
||||
priv->editable = EINA_TRUE;
|
||||
priv->guide_text_vis_enable = EINA_TRUE;
|
||||
|
||||
_view_init(obj);
|
||||
_callbacks_register(obj);
|
||||
|
|
|
@ -203,6 +203,7 @@ struct _Elm_Multibuttonentry_Smart_Data
|
|||
Eina_Bool last_btn_select : 1;
|
||||
Eina_Bool editable : 1;
|
||||
Eina_Bool focused : 1;
|
||||
Eina_Bool guide_text_vis_enable : 1;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue