Re: [E-devel] gen(grid|list)_item del function and its parameters

2010-11-16 Thread The Rasterman
On Tue, 16 Nov 2010 23:15:43 -0200 Gustavo Sverzut Barbieri said: > On Tue, Nov 16, 2010 at 2:53 PM, Bruno Dilly wrote: > > On Sun, Nov 14, 2010 at 8:48 AM, Gustavo Sverzut Barbieri > > wrote: > >> On Sun, Nov 14, 2010 at 8:28 AM, Viktor Kojouharov > >> wrote: > >>> That doesn't seem right. >

Re: [E-devel] gen(grid|list)_item del function and its parameters

2010-11-16 Thread Gustavo Sverzut Barbieri
On Tue, Nov 16, 2010 at 2:53 PM, Bruno Dilly wrote: > On Sun, Nov 14, 2010 at 8:48 AM, Gustavo Sverzut Barbieri > wrote: >> On Sun, Nov 14, 2010 at 8:28 AM, Viktor Kojouharov >> wrote: >>> That doesn't seem right. >>> >>>  elm_gengrid_item_data_set effectively calls elm_widget_item_data_set, whi

Re: [E-devel] gen(grid|list)_item del function and its parameters

2010-11-16 Thread Bruno Dilly
On Sun, Nov 14, 2010 at 8:48 AM, Gustavo Sverzut Barbieri wrote: > On Sun, Nov 14, 2010 at 8:28 AM, Viktor Kojouharov > 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

Re: [E-devel] gen(grid|list)_item del function and its parameters

2010-11-14 Thread The Rasterman
On Sun, 14 Nov 2010 18:15:36 +0200 Viktor Kojouharov said: :) what this does point out is that maybe the documentation needs improving :) but as such you get the appropriate data passed to you so you can free it/clean it up. > I see. I was getting totally confused by that. This whole time I thou

Re: [E-devel] gen(grid|list)_item del function and its parameters

2010-11-14 Thread Viktor Kojouharov
I see. I was getting totally confused by that. This whole time I thought that the functions got the func.data, and not the item data. This makes a lot more sense now On Sun, Nov 14, 2010 at 3:20 PM, Carsten Haitzler wrote: > On Sun, 14 Nov 2010 13:12:41 +0200 Viktor Kojouharov < > vkojouha...@gma

Re: [E-devel] gen(grid|list)_item del function and its parameters

2010-11-14 Thread The Rasterman
On Sun, 14 Nov 2010 13:12:41 +0200 Viktor Kojouharov said: no we aren't: 10:20PM ~/C/elementary/src/lib > grep -- '->func.del(' elm_gengrid.c item->gic->func.del((void *)item->base.data, item->wd->self); item->gic->func.del((void *)item->base.data, item->wd->self); item-

Re: [E-devel] gen(grid|list)_item del function and its parameters

2010-11-14 Thread Gustavo Sverzut Barbieri
On Sun, Nov 14, 2010 at 9:12 AM, Viktor Kojouharov wrote: > Yes. And I'm talking about the item data. We are getting func.data in the > del function, so we can clean that, but we can't clean out the item data > itself, can we? But if we are allowed to set the item data, then we should > always be

Re: [E-devel] gen(grid|list)_item del function and its parameters

2010-11-14 Thread Viktor Kojouharov
Yes. And I'm talking about the item data. We are getting func.data in the del function, so we can clean that, but we can't clean out the item data itself, can we? But if we are allowed to set the item data, then we should always be able to clean it up. On Sun, Nov 14, 2010 at 12:57 PM, Carsten Hai

Re: [E-devel] gen(grid|list)_item del function and its parameters

2010-11-14 Thread The Rasterman
On Sun, 14 Nov 2010 12:28:53 +0200 Viktor Kojouharov said: read more carefully. func_data which is passed to the select callback func vs data which is the item data. :) > That doesn't seem right. > > elm_gengrid_item_data_set effectively calls elm_widget_item_data_set, which > sets the data in

Re: [E-devel] gen(grid|list)_item del function and its parameters

2010-11-14 Thread Gustavo Sverzut Barbieri
On Sun, Nov 14, 2010 at 8:28 AM, Viktor Kojouharov 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_Gen

Re: [E-devel] gen(grid|list)_item del function and its parameters

2010-11-14 Thread Viktor Kojouharov
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

Re: [E-devel] gen(grid|list)_item del function and its parameters

2010-11-13 Thread The Rasterman
On Sun, 14 Nov 2010 04:34:27 +0200 Viktor Kojouharov said: no - it's the one and the same data - if u set it (change it later for that item) then the new data pointer you set will be passed to the del and other class calls. > you get the item that that was passed when item_append|prepend was cal

Re: [E-devel] gen(grid|list)_item del function and its parameters

2010-11-13 Thread Viktor Kojouharov
you get the item that that was passed when item_append|prepend was called. But you can also call elm_gengrid_item_data_set, and if I red the code correctly, that doesn't touch the previous data, but sets a whole new one. And this is the one that you cannot get during the deletion of the item. On S

Re: [E-devel] gen(grid|list)_item del function and its parameters

2010-11-13 Thread The Rasterman
On Sat, 13 Nov 2010 18:54:38 +0200 Viktor Kojouharov said: because it gets the item DATA that is set (the app-side data) for it to clean up/delete. genlist/grid will delete the object that is the item itself. so you don't get it. if you want to clean up something in the object of the item itself

Re: [E-devel] gen(grid|list)_item del function and its parameters

2010-11-13 Thread Rafael Fonseca
On 11/13/2010 11:15 PM, Viktor Kojouharov wrote: > That won't help you if you call elm_gengrid_clear() for example. Hmm, you're right. > I think the only sane way would be from within the del function By del function you mean the del function of the item class, right? It seems reasonable to me.

Re: [E-devel] gen(grid|list)_item del function and its parameters

2010-11-13 Thread Viktor Kojouharov
That won't help you if you call elm_gengrid_clear() for example. I think the only sane way would be from within the del function On Sun, Nov 14, 2010 at 3:05 AM, Rafael Fonseca wrote: > On 11/13/2010 02:54 PM, Viktor Kojouharov wrote: > >> Why doesn't that function receive the actual item object

Re: [E-devel] gen(grid|list)_item del function and its parameters

2010-11-13 Thread Rafael Fonseca
On 11/13/2010 02:54 PM, Viktor Kojouharov wrote: > Why doesn't that function receive the actual item object as a parameter? > The object itself can hold user data, which might need cleaning when the > item is deleted. From that function however, there's no way to clear that > data, since all you g