Hi Maxime,
Maxime Henrion <mhenr...@gmail.com> writes:

>>> Finally, another question comes to mind: why is the "activate" signal
>>> bound by the "activateLeaf" signal handler?  Should I take advantage of
>>> this patch to rename it to just "activate", or "menuItemActivate" if
>>> there are namespace conflicts?
>> Yes, menuItemActivate is right signal name.
>> But after we change to 'menuItemActivate' it conflict with function
>> 'menu_item_activate' that emit 'activate' signal.
>>
>> So we change function 'menuItemActivate' (menu_item_activate) to
>> 'menuItemEmitActivate' avoid conflict.
>>
>> Please see detail in patches i push. :)
>
> So, you actually qualified every signal handler with  the object name;
> I thought we were only doing this in case of namespace conflicts,
> which is why I didn't do it.  However, there's a problem in your
> patch, as far as I can see: you have prefixed the "select", "deselect"
> and "toggle" signals with "menuItem", while they are actually signal
> handlers for the Item object and not the MenuItem one.  So I think
> they should have been named "itemSelect", "itemDeselect" and
> "itemToggle" respectively.
We not just change signal name when it conflict with other module.
We need add object prefix if signal name is too generic.

The object prefix in signal name just a prefix to avoid conflict, not any
sense for signal.

When you use 'menuItemSelect', you can consider it's a signal 'select' in
module 'MenuItem'

If we change signal to 'itemSelect', how do you handle signal name if GTK+ add
*new* module 'Item' with same signal 'select'? :)

  -- Andy









------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Gtk2hs-devel mailing list
Gtk2hs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel

Reply via email to