fixed. thank you. ------------------------------------ -Regards, Hermet-
-----Original Message----- From: "ChunEon Park"<her...@naver.com> To: "Daniel Zaoui"<daniel.za...@samsung.com>; "Enlightenment developer list"<enlightenment-devel@lists.sourceforge.net>; Cc: Sent: 2015-01-08 (목) 10:58:51 Subject: Re: [E-devel] [EGIT] [core/elementary] master 01/01: genlist: refactor code. thank you. i will check. ------------------------------------ -Regards, Hermet- -----Original Message----- From: "Daniel Zaoui"<daniel.za...@samsung.com> To: "Enlightenment developer list"<enlightenment-devel@lists.sourceforge.net>; <her...@hermet.pe.kr>; Cc: Sent: 2015-01-07 (수) 17:52:06 Subject: Re: [EGIT] [core/elementary] master 01/01: genlist: refactor code. Hi Hermet, Please check elm_test on genlist 3. Click fast on an item and you will see a beautiful segfault. It is due to the fact that selected list is composed of Elm_Object_Item (Eo) and not Elm_Gen_Item. Thanks to ya-kov for spotting this. D2 On 01/06/15 13:16, ChunEon Park wrote: > hermet pushed a commit to branch master. > > http://git.enlightenment.org/core/elementary.git/commit/?id=3dc73cfcdb4fb6638cba2c5e0c97c5729a55f39b > > commit 3dc73cfcdb4fb6638cba2c5e0c97c5729a55f39b > Author: ChunEon Park <her...@hermet.pe.kr> > Date: Tue Jan 6 20:17:03 2015 +0900 > > genlist: refactor code. > > select/unselect items by using common select function. > --- > src/lib/elm_genlist.c 42 +++++++++++++++++------------------------- > 1 file changed, 17 insertions(+), 25 deletions(-) > > diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c > index f9b4b53..fbfbeb4 100644 > --- a/src/lib/elm_genlist.c > +++ b/src/lib/elm_genlist.c > @@ -5705,20 +5705,29 @@ _item_select(Elm_Gen_Item *it) > ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd); > Elm_Object_Item *eo_it = EO_OBJ(it); > > + if (eo_do(eo_it, elm_wdg_item_disabled_get())) return; > + > if (_is_no_select(it) > (it->generation < sd->generation) > (it->decorate_it_set)) > return; > > + if (!sd->multi) > + { > + const Eina_List *l, *ll; > + Elm_Gen_Item *it2; > + EINA_LIST_FOREACH_SAFE(sd->selected, l, ll, it2) > + { > + if (it2 != it) _item_unselect(it2); > + } > + } > + > if (!it->selected) > { > it->selected = EINA_TRUE; > sd->selected = > eina_list_append(sd->selected, eo_it); > } > - else if ((sd->select_mode != ELM_OBJECT_SELECT_MODE_ALWAYS) && > - (it->select_mode != ELM_OBJECT_SELECT_MODE_ALWAYS)) > - return; > > evas_object_ref(obj); > it->walking++; > @@ -6531,31 +6540,14 @@ _elm_genlist_item_selected_set(Eo *eo_item > EINA_UNUSED, Elm_Gen_Item *it, > ELM_GENLIST_ITEM_CHECK_OR_RETURN(it); > ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd); > > - if ((it->generation < sd->generation) eo_do(EO_OBJ(it), > elm_wdg_item_disabled_get())) > - return; > + if ((it->generation < sd->generation) > + eo_do(EO_OBJ(it), elm_wdg_item_disabled_get())) return; > + > selected = !!selected; > if (it->selected == selected) return; > > - if (selected) > - { > - if (!sd->multi) > - { > - while (sd->selected) > - { > - Elm_Object_Item *eo_sel = sd->selected->data; > - ELM_GENLIST_ITEM_DATA_GET(eo_sel, sel); > - if (it->unhighlight_cb) > - it->unhighlight_cb(sel); > - it->unsel_cb(sel); > - } > - } > - it->highlight_cb(it); > - it->sel_cb(it); > - > - return; > - } > - if (it->unhighlight_cb) it->unhighlight_cb(it); > - it->unsel_cb(it); > + if (selected) _item_select(it); > + else _item_unselect(it); > } > > EOLIAN static Eina_Bool > ------------------------------------------------------------------------------ Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel ------------------------------------------------------------------------------ Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel