After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 158959 - should keep names when copying
should keep names when copying
Status: RESOLVED NOTABUG
Product: glade-legacy
Classification: Deprecated
Component: general
unspecified
Other Linux
: High normal
: ---
Assigned To: Damon Chaplin
Damon Chaplin
Depends on:
Blocks:
 
 
Reported: 2004-11-21 18:29 UTC by Gustavo Noronha (kov)
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Gustavo Noronha (kov) 2004-11-21 18:29:03 UTC
From the original submitter:

"If you copy something in glade, all the names of the objects making it up are
reset to default names, which means you have to go through resetting them all
for your code to work. Whilst this makes sense for cut-and-paste within a
single window, if you cut-and-paste a whole window in the window list window,
it is a real pain."

While the toplevel widgets really need to have different names, as do the
widgets inside a same window, two objects can share names being on different
top-level windows. Thus, it does make sense to keep the names of the child
widgets when copying/pasting.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=281934
Comment 1 Damon Chaplin 2004-11-22 10:51:09 UTC
We use the widget name as an ID in the XML file, so I think they must be unique.
So I can't really change this.

In future I think having one window per XML file will be the recommended usage,
so the problem will be avoided.
Comment 2 Gustavo Noronha (kov) 2004-12-09 01:55:25 UTC
Aren't they on different 'trees', though? This is probably enough namespace
protection. Having one window per XML file and having glade handle that would be
good, though.
Comment 3 Damon Chaplin 2004-12-09 11:48:56 UTC
From the XML spec:

=============================================================================
Validity constraint: ID

Values of type ID MUST match the Name production. A name MUST NOT appear more
than once in an XML document as a value of this type; i.e., ID values MUST
uniquely identify the elements which bear them.
=============================================================================

All of the windows in a .glade file are in the same XML document so the
IDs must be unique.