gengrid: fix wrong access info returns in access info set 65/142065/3
authorSangHyeon Jade Lee <dltkdgus1764@gmail.com>
Wed, 2 Aug 2017 10:31:10 +0000 (19:31 +0900)
committerSangHyeon Jade Lee <dltkdgus1764@gmail.com>
Tue, 8 Aug 2017 06:24:35 +0000 (15:24 +0900)
Change-Id: I66478fee1468c1f57cddbf7ba9fd8c98344de161
Signed-off-by: SangHyeon Jade Lee <dltkdgus1764@gmail.com>
src/lib/elm_gengrid.c

index be5d945..02be27e 100644 (file)
@@ -1492,26 +1492,40 @@ _item_unrealize_cb(Elm_Gen_Item *it)
 static char *
 _access_info_cb(void *data, Evas_Object *obj EINA_UNUSED)
 {
+   char *ret;
+   Eina_Strbuf *buf;
+
    Elm_Gen_Item *it = (Elm_Gen_Item *)data;
    ELM_GENGRID_ITEM_CHECK_OR_RETURN(it, NULL);
 
+   buf = eina_strbuf_new();
+
    if (it->itc->func.text_get)
      {
-        const Eina_List *l;
+        Eina_List *texts;
         const char *key;
 
-        if (!(it->texts)) it->texts =
+        texts =
           elm_widget_stringlist_get(edje_object_data_get(VIEW(it), "texts"));
 
-        EINA_LIST_FOREACH(it->texts, l, key)
+        EINA_LIST_FREE(texts, key)
           {
              char *s = it->itc->func.text_get
                 ((void *)WIDGET_ITEM_DATA_GET(EO_OBJ(it)), WIDGET(it), key);
-             return s;
+             s = _elm_util_mkup_to_text(s);
+
+             if (s)
+               {
+                  if (eina_strbuf_length_get(buf) > 0) eina_strbuf_append(buf, ", ");
+                  eina_strbuf_append(buf, s);
+                  free(s);
+               }
           }
      }
 
-   return NULL;
+   ret = eina_strbuf_string_steal(buf);
+   eina_strbuf_free(buf);
+   return ret;
 }
 
 static char *