I am converting an app from using Gtk2::GladeXML to Gtk2::Builder. When getting all widgets with
@widgets = $glade_object->get_widget_prefix('')
I could get the name (set in Glade) of a widget with
$widgets[0]->get_widget_name
With Gtk2::Builder I fetch all widgets with
@widgets = $builder_object->get_objects
But $widgets[0]->get_widget_name
is not known. $widgets[0]->get_name
just gives me the widget class, e.g. GtkImage.
So my question is: How do i get the name (or id) of an widget which was created with Gtk2::Builder?
Thanks for any help.
thanks @johannes-sasongko! this really works. so what i do now is:
this is kind of a hack, but it works. better/cleaner solutions welcome!