On Wed, 22 May 2019 22:24:25 GMT, Alex X wrote:
Is there a way to get the menuitems from a menu. I really just need the id's of all the menuitems attached/appended. (it's loaded from a glade file so I don't have them directly)
Also, How can I compare widgets in a menu to find out which menuitem was used in one handler?
x = (GdkEventButton* e, Widget w)
{
switch(w)
{
case menuItem1:
case menuItem2:
}
});
menuItem1.addOnButtonPress(x);
menuItem2.addOnButtonPress(x);
I'm using the same handler thinking it would be easier...(reduce code bloat mainly, even though it's not much).
But the switch(or if's) do not compare. Not sure what widget is but nothing through.