Re: [pygtk] Pyglade + multiple windows

2002-01-13 Thread Pedro Rodriguez

On Sunday 13 January 2002 02:25, Colin Fox wrote:
> Hi. I'm using pyglade and enjoying it immensely. However, I can't
> seem to figure out how to create multiple simultaneous instances of a
> window.
>

Just create a new GladeXML object from the same glade file, and use the 
new object to get a new window, widget. 

According to libglade document, the file won't be reparsed because the 
result of parsing is maintained in a cache.


import gtk
import libglade

x = libglade.GladeXML("ui.glade")
w1 = x.get_widget("myWindow")

y = libglade.GladeXML("ui.glade")
w2 = x.get_widget("myWindow")

gtk.mainloop()

-- 
Pedro

___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk



Re: [pygtk] Pyglade + multiple windows

2001-04-12 Thread Gustavo João Alves Marques Carneiro

On 12 Apr 2001, Colin Fox wrote:

> Hi. I'm using pyglade and enjoying it immensely. However, I can't seem
> to figure out how to create multiple simultaneous instances of a window.
> 
> The gimp, for example, has one each of the toolbox, layers, brushes, etc
> dialogs, but it has one image window per image.
> 
> How would you do something like this in pyglade?

  I think what you want is this:
1- Give a name to the window you wish to duplicate in glade.
2- Create a new xml tree: xml = GladeXML(file, root)
   where root=name of window (see 1)

> 
> Thanks,
> 
> Colin.
> ___
> pygtk mailing list   [EMAIL PROTECTED]
> http://www.daa.com.au/mailman/listinfo/pygtk
> 

-- 
Gustavo J. A. M. Carneiro
[http://linuxdeec.fe.up.pt/~ee96090]

___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk



[pygtk] Pyglade + multiple windows

2001-04-12 Thread Colin Fox

Hi. I'm using pyglade and enjoying it immensely. However, I can't seem
to figure out how to create multiple simultaneous instances of a window.

The gimp, for example, has one each of the toolbox, layers, brushes, etc
dialogs, but it has one image window per image.

How would you do something like this in pyglade?

Thanks,

Colin.
___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk