On Tue, Nov 16, 2010 at 2:53 PM, Bruno Dilly <bdi...@profusion.mobi> wrote: > On Sun, Nov 14, 2010 at 8:48 AM, Gustavo Sverzut Barbieri > <barbi...@profusion.mobi> wrote: >> On Sun, Nov 14, 2010 at 8:28 AM, Viktor Kojouharov >> <vkojouha...@gmail.com> wrote: >>> That doesn't seem right. >>> >>> elm_gengrid_item_data_set effectively calls elm_widget_item_data_set, which >>> sets the data in Elm_Widget_Item->data, whereas the data that is passed to >>> all the append|prepend functions is stored in Elm_Gengrid_Item->func.data. >>> To me, they look like totally different places, unless I'm missing >>> something. >> >> there are 2 data. One for the item as a whole, and another to be given >> to the func callback that is called when item is selected. >> >> Usually, they are the same, or the first contains the second, as you >> need to delete the second when the item dies. >> >> As raster and others said, you're likely trying to do a strange thing. >> You have 3 steps for genlist/gengrid: >> - view death (use evas_object_event_callback_add with EVAS_CALLBACK_DEL) >> - item unrealize (use evas_object_smart_callback_add with "unrealized") >> - item death (use item_del_cb_set[1]) >> >> The first one is called more than unrealize, because when item is >> updated it may destroy the existing view and create a new one, >> repopulating it with new labels, icons and state. >> >> The second is called whenever the object goes off screen and thus is >> not necessary anymore, the container widget (genlist/gengrid) may >> choose a point to kill the view to save memory. Right now this is >> immediate, but may be changed in future to reduce deletion/creation of >> items. >> >> The third one is, for some weird reason, not available. I really don't >> know/remember why there are no >> elm_{gengrid,genlist}_item_del_cb_set(). Similarly to others it would >> be a simple wrapper around elm_widget_item_del_cb_set(). I'll wait >> for dudes at ProFUSION (bdilly? tiagofalcao?) to refresh my memory and >> tell why we did not add them, or if we just forgot and they should be >> added. > > I'm enjoying something else today. > > But looking quickly at these widgets code, looks like func.del is > intended for use when items are deleted. > I believe these item classes stuff was added > before then widget_item generalization, so maybe we can remove > func.del and use del_cb_set? > Or am I missing something and they are intended to be used under > different circumstances? > > If you need to add del_cb_set urgently, use the attached patch.
Damn it! I knew there was something different about them, it was the Item class' del. Raster, do you think it is better to add an item_del_cb_set and remove class' del? Or keep the way it is? BTW, why do we use char* for labels? Having to strdup is quite bad, particularly when most of your strings are stringshared by other parts of EFL. -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -------------------------------------- MSN: barbi...@gmail.com Skype: gsbarbieri Mobile: +55 (19) 9225-2202 ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today http://p.sf.net/sfu/msIE9-sfdev2dev _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel