Which widget id triggered the event?

Is there any way to figure out which widget id triggered an event?
An example
I have a common function that could be triggered by either a button click, menuitem, popup menuitem, etc...
Depending on what widget was used I want call the same function, detemine which widget, then process accordingly. Based on which widget I would perform all or a subset of the function.
I've looked into the Gtk2::main and Gtk2::Widget methods and they provide the event widget (GtkMenuItem) and complete path (GtkWindow.GtkMenu.GtkMenuItem) but I would need the id of the menu item (ex: "menu name1" or "menu name 2")  in order to process accordingly.
The way I do it now is to have the signal handler from the widget call the function and pass it what it needs.
Thanks in advance,

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]