gengrid: fix serach items in genlist by text
authorVyacheslav Reutskiy <v.reutskiy@samsung.com>
Thu, 26 Jan 2017 08:54:30 +0000 (10:54 +0200)
committerVyacheslav Reutskiy <v.reutskiy@samsung.com>
Thu, 26 Jan 2017 08:54:30 +0000 (10:54 +0200)
If a part name is NULL get text for search from TEXT part 'elm.text".

@fix

src/lib/elementary/elm_gengrid.c
src/lib/elementary/elm_gengrid.eo

index 651e3a7..489d19d 100644 (file)
@@ -398,7 +398,7 @@ _elm_gengrid_search_by_text_item_get(Eo *obj EINA_UNUSED,
      {
         if (!it->itc->func.text_get) continue;
         str = it->itc->func.text_get((void *)WIDGET_ITEM_DATA_GET(EO_OBJ(it)),
-                                     WIDGET(it), part_name);
+                                     WIDGET(it), part_name ? part_name : "elm.text");
         if (!str) continue;
         if (!fnmatch(pattern, str, fnflags))
           {
index c2d3ae0..56f8010 100644 (file)
@@ -518,7 +518,7 @@ class Elm.Gengrid (Elm.Layout, Elm.Interface_Scrollable,
                Pointer to item to start search from. If $null, search will
                be started from the first item of the gengrid.
             ]]
-            @in part_name: string; [[Name of the TEXT part of gengrid item to search string in.]]
+            @in part_name: string; [[Name of the TEXT part of gengrid item to search string in. If $null, search by "elm.text" parts.]]
             @in pattern: string; [[The search pattern.]]
             @in flags: Elm.Glob.Match_Flags; [[Search flags.]]
          }