On Aug 4, 2008, at 7:13 AM, Bernd Jendrissek wrote:
> I think only part of it: if I understood Patrick correctly, only the
> g_keys_* functions should have a "rest" argument, which they then
> thunk into C-friendly arguments in i_callbacks_*.  Ah, now I see
> Patrick has replied too.  'nuff said.

Passing an additional parameter to a GObject/GTK callback function  
will be difficult.  The callback's function signature must match the  
signal handler's specification.  Right now, the function signatures in  
i_callbacks.c do not match the invocations in x_menus.c.  (Using an  
item the popup menu probably causes something bad.)  Going the other  
direction, however, works well.  A GObject/GTK signal handler can pass  
an additional parameter to another function.

Although the modified i_callback_* function names need to be changed,  
and the code moved to another file, I believe the patch is a step in  
the right direction.  New callback functions can be placed in  
i_callbacks.c to both call and replace their older counterparts.  The  
functions can be renamed and moved out over time.  It might be tough  
to stay branched until this refactoring could be made into a "perfect  
patch."

I'm working in this area and don't mind assisting with the  
refactoring.  I'm already trying to wrap the i_callbacks with  
GtkAction "activate" signal handlers and replace the popup menu with  
GtkAction menu item proxies.

Cheers,
Ed




_______________________________________________
geda-dev mailing list
[email protected]
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev

Reply via email to