Re: [pygtk] Problem incorporating Python-subclassed widget into Glade

2004-09-02 Thread Johan Dahlin
ons 2004-09-01 klockan 15.27 skrev Skip Montanaro:
> I subclassed gtk.Table, then started trying to integrate it with Glade-2.  I
> realized I needed to set __gproperties__ to add a property to the class, so
> I added that:

In 2.3.9x I added a fourth argument to gtk.glade.XML, it's a dictionary
used to do lookups, so if you send in {'GtkTable': 'MyTable' } and have
registered a GType with the same name it should instanstiate that
object.

However, as you have noticed the python constructor, __init__ is not
called. That's because when libglade creates widgets it uses
g_object_new (which is wrapped as gobject.new in python) which just uses
a GObject constructor. I don't think, at this point, that its possible
to put any python code in there. I'm afraid you have to do something
else, perhaps __new__ works?


Johan
-- 
Johan Dahlin <[EMAIL PROTECTED]>

___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


Re: [pygtk] About Fullscreen libglade windows

2004-09-02 Thread Christian Robottom Reis
On Wed, Sep 01, 2004 at 10:15:31PM +0100, Graham Ashton wrote:
> On Fri, 2004-08-27 at 21:48, Douglas Soares de Andrade wrote:
> >
> > How to make a form init the execution maximized using libglade. I already did 
> > the window and it is work perfectly. 
> > 
> > The only thing left to do is make it start maximized.
> 
> Just call maximize() on the window before you enter the main loop.

-> FAQ 10.16

http://www.async.com.br/faq/pygtk/index.py?req=show&file=faq10.016.htp

Comments and changes appreciated.

Take care,
--
Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 3361 2331
___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/