elm_genlist.c: return "elm.swallow.icon" part's object when the part parameter is null on _item_content_get_hook().

Now elm_object_item_content_get() works fine.
+ avoid ambiguous if-else statement by using braces.
This commit is contained in:
Daniel Juyung Seo 2013-11-30 18:28:47 +09:00
parent 00bd27a883
commit 9efa212975
1 changed files with 12 additions and 5 deletions

View File

@ -5202,7 +5202,12 @@ _item_content_get_hook(Elm_Gen_Item *it,
else if (it->decorate_it_set)
ret = edje_object_part_swallow_get(it->item->deco_it_view, part);
if (!ret)
ret = edje_object_part_swallow_get(VIEW(it), part);
{
if (part)
ret = edje_object_part_swallow_get(VIEW(it), part);
else
ret = edje_object_part_swallow_get(VIEW(it), "elm.swallow.icon");
}
return ret;
}
@ -5217,10 +5222,12 @@ _item_text_get_hook(Elm_Gen_Item *it,
else if (it->decorate_it_set)
ret = edje_object_part_text_get(it->item->deco_it_view, part);
if (!ret)
if (part)
ret = edje_object_part_text_get(VIEW(it), part);
else
ret = edje_object_part_text_get(VIEW(it), "elm.text");
{
if (part)
ret = edje_object_part_text_get(VIEW(it), part);
else
ret = edje_object_part_text_get(VIEW(it), "elm.text");
}
return ret;
}