Comment 6 for bug 1082391

Revision history for this message
Martin Pitt (pitti) wrote :

So, the existing "name" property, which is usually empty, actually comes from GtkWidget and is a custom name that the code can set with gtk_widget_set_name(), or a GtkBuilder file can set with "name", which can be referred to with CSS stylesheets, etc. So we should let this alone.

The name that I'm interested in is the GtkBuilder ID, which is unique and usually doesn't change in a project as code uses this to actually deal with the widgets (gtk_builder_get_object() ). So what we want to do is to use gtk_buildable_get_name() to get the GtkBuilder ID and export that to a property like "builder_name". I already verified that this gives the expected names, one can call Gtk.Buildable.get_name(obj) in GI.