I can see 2 approaches here:

1) Create an id to identify every signal connection and use it on
disconnect when needed (as done by the patch)
2) Change etk_signal_disconnect to receive one more param, the
user_data, the same way as etk_signal_connect does, cause I can have
the same callback been called with different user data, and i want to
disconnect just one of them

The second approach is more commonly used, for example by GTK+. If i
had to choose i would go for it, as usually you have a reference to
the user_data when you need to call disconnect, so you don't need to
store the id anywhere.
If we choose the first approach, I would vote for change
etk_signal_disconnect to receive the id directly and would not
introduce another function etk_signal_disconnect_one as a hack

BR

On 9/14/07, Gustavo Sverzut Barbieri <[EMAIL PROTECTED]> wrote:
> Kakaroto: please remember to CC the list (ie: reply-all)!
>
>
> On 9/13/07, Youness Alaoui <[EMAIL PROTECTED]> wrote:
> > Looks good, but maybe it would be better to do a 
> > disconnect_one(etk_signal); since the etk_signal represents a unique 
> > signal, so there's no
> > need to pass the signal name (or even the Etk_Object the signal is 
> > associated with).
> > If that info is needed and not available with Etk_Signal_Callback, then 
> > maybe just add those two to the Etk_Signal_Callback structure.
>
> Fine, you made me look at the code and think about it, I also talked
> with Caio and he'll look at ETK signal internals in order to simplify
> and optimize it. In our opinion it can be simplified a lot by using
> different data structures and maybe some API changes.
>
> --
> Gustavo Sverzut Barbieri
> --------------------------------------
> Jabber: [EMAIL PROTECTED]
>    MSN: [EMAIL PROTECTED]
>   ICQ#: 17249123
>  Skype: gsbarbieri
> Mobile: +55 (81) 9927 0010
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>


-- 
Andre Moreira Magalhaes (andrunko)
--------------------------------------------------------
Jabber: [EMAIL PROTECTED]
MSN:   [EMAIL PROTECTED]
Skype:  andrunko
Blog:    http://andrunko.blogspot.com

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to