forked from enlightenment/efl
[elementary/elm_layout] There can be the cases with no aliases and no part name. Then EINA_FALSE should be returned.
Should All widgets(including elm_layout) have default aliases? or Not?. SVN revision: 79861
This commit is contained in:
parent
94323ef618
commit
5147620d6c
|
@ -50,7 +50,7 @@ test_layout(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
|
|||
|
||||
ly = elm_layout_add(win);
|
||||
elm_layout_theme_set(ly, "layout", "application", "titlebar");
|
||||
elm_object_text_set(ly, "Some title");
|
||||
elm_object_part_text_set(ly, "elm.text", "Some title");
|
||||
evas_object_size_hint_weight_set(ly, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_align_set(ly, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
elm_box_pack_end(box, ly);
|
||||
|
@ -83,6 +83,7 @@ test_layout(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
|
|||
bt = elm_button_add(win);
|
||||
elm_object_text_set(bt, "Button 2");
|
||||
elm_object_part_content_set(ly, "element2", bt);
|
||||
//elm_object_part_content_set(ly, NULL, bt);
|
||||
evas_object_smart_callback_add(bt, "clicked", _clicked_cb, ly);
|
||||
evas_object_show(bt);
|
||||
|
||||
|
|
|
@ -647,9 +647,7 @@ _elm_layout_part_aliasing_eval(const Evas_Object *obj EINA_UNUSED,
|
|||
else
|
||||
eo_do(sd->obj, elm_obj_layout_smart_content_aliases_get(&aliases));
|
||||
|
||||
if (!aliases) return EINA_TRUE;
|
||||
|
||||
while (aliases->alias && aliases->real_part)
|
||||
while (aliases && aliases->alias && aliases->real_part)
|
||||
{
|
||||
/* NULL matches the 1st */
|
||||
if ((!*part) || (!strcmp(*part, aliases->alias)))
|
||||
|
|
Loading…
Reference in New Issue