Web lists-archives.com

CSS # selectors and UI IDs

Hello Everyone,

Forgive the cross-posting. I originally asked this in the language-bindings mailing list, but I don't think anyone actually uses that one.

Working on the Ruby bindings for GTK, and a question came up regarding the relationship between CSS selectors and UI elements. On the Gnome developer page for GtkCssProvider, it says:

Selectors work very similar to the way they do in CSS, with widget class names taking the role of element names, and widget names taking the role of IDs. When used in a selector, widget names must be prefixed with a '#' character. The '*' character represents the so-called universal selector, which matches any widget.

I take that to mean that when the GtkBuilder object parses the UI file, the name property of the created widget object should be identical to the ID in the UI file. Can someone please confirm if this is the case?
gtk-list mailing list