aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Juyung Seo <juyung.seo@samsung.com>2013-11-30 18:28:47 +0900
committerDaniel Juyung Seo <juyung.seo@samsung.com>2013-11-30 18:28:47 +0900
commitb236c2ad01e41151a04f4a87c7ffdb1569777349 (patch)
tree1d2f43505d97f7a4cdf72e29dd0b7a102a7da198
parentelm_genlist.c: return "elm.text" part's text when the part parameter is null ... (diff)
downloadelementary-b236c2ad01e41151a04f4a87c7ffdb1569777349.tar.gz
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.
-rw-r--r--src/lib/elm_genlist.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c
index 19d76e359..c43241953 100644
--- a/src/lib/elm_genlist.c
+++ b/src/lib/elm_genlist.c
@@ -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;
}