[Glade-devel] widgets with the same name in the same file?

Roland Koebler r.koebler at yahoo.de
Thu Apr 3 08:08:05 UTC 2014


Hi,

unfortunately, I noticed that Glade 3.12.1 broke my old glade-files
*again*, since it forbids that widgets have the same name in a single
glade-file; this was possible in Glade 2, broke in Glade 3.4 (or
earlier), was possible again in a later Glade-version, and broke
again in Glade 3.12 (or earlier). Additionally, Glade silently renames
non-unique-widget-names, so that a simple load-and-save *breaks*
applications.

I filled a bug-report:
https://bugzilla.gnome.org/show_bug.cgi?id=727507

Can anybody tell me, why Glade constantly breaks this?

Even if it might sound strange, having widgets with the same names
-- as long as they are in different toplevels -- is *very* useful,
since it allows to have several toplevel-windows in the same gladefile,
with each toplevel-window e.g. having a "close_button", a "number_entry"
etc.  The only current workaround I know, is to use a separate glade-file
for *every* toplevel-window, resulting in an unhandy, large number of
gladefiles. :((


Roland


On Thu, Sep 17, 2009 at 06:34:32PM +0200, Timo wrote:
> It is possible. When you start Glade (or Edit=>Preferences), choose
> in the preferences dialog for:
> Object names are unique: inside toplevels
> 
> Instead of "Within the project".
> 
> Timo
> 
> 
> Roland Koebler schreef:
> >Hi,
> >
> >in Glade v3 it seems to be impossible to give two widgets the same
> >name, which was possible in Glade v2. Although it may sound strange
> >at first, it definitely is useful to have two widgets with the same
> >name in one file, e.g. for having several windows in 1 glade-file,
> >where each window has a "close_button" or a "number_entry".
> >I used this a lot with Glade v2.
> >
> >So, could you again (like in Glade v2) allow several widgets with the
> >same name in one file?
> >
> >(The alternative for the example above would either be much longer widget-
> >names (plus specific code for every window, since generic code may not work)
> >or a whole bunch of glade-files---which both seems clumsy.)
> >
> >
> >regards,
> >Roland


More information about the Glade-devel mailing list