[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:
WooHyun Jung 2012-11-30 06:18:48 +00:00
parent 94323ef618
commit 5147620d6c
2 changed files with 3 additions and 4 deletions

View File

@ -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);

View File

@ -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)))