summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVyacheslav Reutskiy <v.reutskiy@samsung.com>2017-01-26 10:54:30 +0200
committerVyacheslav Reutskiy <v.reutskiy@samsung.com>2017-01-26 10:54:30 +0200
commitd37de735ebde61a4f6984f7e1858fe12e91c7eae (patch)
tree353f1677f7b901809c3b33a159a2904f6e8fc61d
parentf9589211772c8b47765795157f4c9288b00b0aa5 (diff)
gengrid: fix serach items in genlist by text
If a part name is NULL get text for search from TEXT part 'elm.text". @fix
-rw-r--r--src/lib/elementary/elm_gengrid.c2
-rw-r--r--src/lib/elementary/elm_gengrid.eo2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/elementary/elm_gengrid.c b/src/lib/elementary/elm_gengrid.c
index 651e3a74cf..489d19dca8 100644
--- a/src/lib/elementary/elm_gengrid.c
+++ b/src/lib/elementary/elm_gengrid.c
@@ -398,7 +398,7 @@ _elm_gengrid_search_by_text_item_get(Eo *obj EINA_UNUSED,
398 { 398 {
399 if (!it->itc->func.text_get) continue; 399 if (!it->itc->func.text_get) continue;
400 str = it->itc->func.text_get((void *)WIDGET_ITEM_DATA_GET(EO_OBJ(it)), 400 str = it->itc->func.text_get((void *)WIDGET_ITEM_DATA_GET(EO_OBJ(it)),
401 WIDGET(it), part_name); 401 WIDGET(it), part_name ? part_name : "elm.text");
402 if (!str) continue; 402 if (!str) continue;
403 if (!fnmatch(pattern, str, fnflags)) 403 if (!fnmatch(pattern, str, fnflags))
404 { 404 {
diff --git a/src/lib/elementary/elm_gengrid.eo b/src/lib/elementary/elm_gengrid.eo
index c2d3ae02db..56f8010629 100644
--- a/src/lib/elementary/elm_gengrid.eo
+++ b/src/lib/elementary/elm_gengrid.eo
@@ -518,7 +518,7 @@ class Elm.Gengrid (Elm.Layout, Elm.Interface_Scrollable,
518 Pointer to item to start search from. If $null, search will 518 Pointer to item to start search from. If $null, search will
519 be started from the first item of the gengrid. 519 be started from the first item of the gengrid.
520 ]] 520 ]]
521 @in part_name: string; [[Name of the TEXT part of gengrid item to search string in.]] 521 @in part_name: string; [[Name of the TEXT part of gengrid item to search string in. If $null, search by "elm.text" parts.]]
522 @in pattern: string; [[The search pattern.]] 522 @in pattern: string; [[The search pattern.]]
523 @in flags: Elm.Glob.Match_Flags; [[Search flags.]] 523 @in flags: Elm.Glob.Match_Flags; [[Search flags.]]
524 } 524 }