On Sun, 22 Mar 2009, DJ Delorie wrote: > >Are you sure this is the functionality you want? It sounded like you >need one context pointer per action, not one context pointer per list >of actions.
This was the simpler and more general change. Currently I use the call with list of 1 action, but I can imagine a situation when I want to do the same for different actions, so I thought why restrcit that? >And there's no reason why the GUIs would need to even know that the >contexts exist. The HID registering the action gives the context for >the action to the common action code, and the common action code tells >the action's handler what the context is. Nobody *invoking* actions >needs to know. Maybe I misunderstand the code, but lesstif_call_action() in hid/lesstif/menu.c calls hid_find_action and then the trigger_cb of the action and this is not a GUI-local. I suspect this can happen to any of my context-registered actions and then I would have context NULL. I don't say the GUI should know about context, but that, as the GTK hid does, the GUI hid should not do this directly but call hid_actionv() from hid/common/actions.c. >Something like: > >hid_register_action (const char *name, ..., void *context); >hid_deregister_action (const char *name); > >The remaining functions need not change. > I have one more layer, which is not part of this patch but the plugin, where I do this. My approach is doing the smallest but more general patch to the core and do everything else in plugins. Regards, Tibor Palinkas _______________________________________________ geda-user mailing list [email protected] http://www.seul.org/cgi-bin/mailman/listinfo/geda-user

