[Glade-devel] Name vs. ID
Tristan Van Berkom
tristan.van.berkom at gmail.com
Tue Apr 1 04:03:12 UTC 2014
This is a well known issue and is fixed in recent versions of Glade
(3.16 and 3.18 should have it fixed).
The General tab property you speak of is now labeled "ID" and now
Glade allows you to set the "name" property in the "Common" tab right
beside the style classes (this belongs together since setting the
"name" is mostly only useful as a CSS selector).
They must remain separate attributes however, since the ID must be
unique, while this is not true for the "name" property.
Cheers,
-Tristan
On Tue, Apr 1, 2014 at 5:32 AM, Roland Koebler <r.koebler at yahoo.de> wrote:
> Hi,
>
> I think I've found a bug in Glade (at least in version 3.12.1; I cannot
> test newer versions quickly, since newer versions don't run and cannot
> be compiled on Debian Stable). But before filling a bugreport, I would
> like to discuss the issue here:
>
> - In the properties-window of Glade (tab "General", 1st entry), I can set a
> "Name" for each widget, e.g. "my_button".
> So, I would assume that this is the name of the widget.
>
> - But, in the stored XML-file, this "Name" is not used as widget-name,
> but as widget-id, and no name-property is set:
>
> <object class="GtkButton" id="my_button">
>
> I would have expected:
>
> <object class="GtkButton" id="some_id">
> <property name="name">my_button</property>
> ...
>
> This is especially problematic since (a) the names "name" and "id" are
> confused here, and (b) the name-property is used in GTK+ for themeing/CSS.
> I'm currently using a workaround to fix this, but this seems wrong:
>
> for f in builder.get_objects():
> f.set_name(Gtk.Buildable.get_name(f))
>
>
> Is this a known bug, has it already been resolved, or is there some
> reason for this weird behaviour?
>
>
> I would propose to use one of the following fixes:
>
> (a) Add a name-property to each widget in the XML-file, containing
> the widget-name.
> or
> (b) Change the label "Name:" to "ID:" in the Glade-properties-window,
> and maybe add a field "Name:" to the properties-window, which sets
> the name-property in the XML-file.
>
>
> regards
> Roland
> _______________________________________________
> Glade-devel maillist - Glade-devel at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/glade-devel
More information about the Glade-devel
mailing list