[Glade-devel] Name vs. ID
- From: r.koebler at yahoo.de (Roland Koebler)
- Subject: [Glade-devel] Name vs. ID
- Date: Mon, 31 Mar 2014 22:32:47 +0200
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
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]