[Glade-users] Unique widget names


I have a rather odd problem, and hope to find some help in these lists:
I'm maintaining a Python application that uses PyGTK and a GTK UI
created with Glade. Until a few months ago (the last time I changed it),
Glade was happy with my practise of using identical names for widgets
inside different containers - as an example, 2 GtkWindow widgets
("window_1" and "window_2") could each have a button called "bt_close".
Since for each window a different class would be instantiated and load
the corresponding widgets using Win=gtk.glade.XML(<glade_file>,
'window_<x>') and bt=Win.glade.get_widget('bt_close'), there was no
possible confusion. I can confirm this to work on Glade up to (and
including) v3.3.3.

Now, after some time without changing the application, I opened it using
Glade 3.4.5 and I found out that when saving the XML file, Glade renamed
all the widgets to "bt_close1", "bt_close2", "bt_close3" and so on,
regardless of the fact that they were in different containers. This has
caused me a lot of trouble, since either I have to use a previous Glade
version (until 3.3.3, at least) or I have to change all my code, class
by class, to match the new widget names. The new Glade (3.4.5) doesn't
allow me to rename a widget and use the same name I already used for
another one, even if they lie inside completely different containers.

I'd like to ask if this behaviour is "by design", or is there a way to
configure it?

Thank you.
Fernando J. Leal
fjleal at essr.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.ximian.com/pipermail/glade-users/attachments/20080827/25c49ba8/attachment.bin 

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]