Re: [pygtk] converting an Numeric array to a Pixbuf

2003-07-29 Thread Tim Evans
Anthony Joseph Seward wrote: I am trying to figure out a simple way of converting a Numeric array to a gtk.gdk.Pixbuf without depending on PIL. I am having a hard time finding documentation on how to make an RGB XPM file or even if it is possible. gdk_pixbuf_new_from_data seems like is what I want

[pygtk] custom widget in GLADE?

2003-07-29 Thread Jon Willeke
I'm using Python 2.2.2, PyGTK 1.99.16, GLADE 1.1.3, and libglade 2.0.1 on Linux. This question appears a couple of times in the archives with no satisfactory answer: how do I use a GLADE custom widget? I have a two-element gtk.HBox in a gtk.Window. On the left I've put a custom widget with a

[pygtk] [ANNOUNCE] Ninth release of PythonCAD now available

2003-07-29 Thread Art Haas
I'd like to announce the ninth development release of PythonCAD, a CAD package for open-source software users. As the name implies, PythonCAD is written entirely in Python. The goal of this project is to create a fully scriptable drafting program that will match and eventually exceed features foun

Re: [pygtk] connect_while_alive() in pygtk2?

2003-07-29 Thread John Ehresman
On Tue, 29 Jul 2003, Christian Reis wrote: > I didn't understand you fully. Even if it is a generic function, storing > a list (or a hash if it becomes necessary) of IDs is safe, since IDs are > unique globally across your application. Then check if the ID is in the > list and remove it otherwise.

Re: [pygtk] connect_while_alive() in pygtk2?

2003-07-29 Thread Christian Reis
On Tue, Jul 29, 2003 at 11:03:07AM -0400, John Ehresman wrote: > That would work but it would further complicate things, particularly > since the _disconnect_callback() is a generic function. I suppose I could > maintain a list of connections and then implement my own disconnect() > function th

Re: [pygtk] connect_while_alive() in pygtk2?

2003-07-29 Thread John Ehresman
On Tue, 29 Jul 2003, Christian Reis wrote: > > the following, which works except that a warning is logged if the handler > > is disconnected before _disconnect_callback() is invoked (because > > disconnect is called multiple times with the same handler id). > > Store a list of connected handler id

Re: [pygtk] connect_while_alive() in pygtk2?

2003-07-29 Thread Christian Reis
On Tue, Jul 29, 2003 at 10:44:47AM -0400, John Ehresman wrote: > the following, which works except that a warning is logged if the handler > is disconnected before _disconnect_callback() is invoked (because > disconnect is called multiple times with the same handler id). Store a list of connected

Re: [pygtk] connect_while_alive() in pygtk2?

2003-07-29 Thread John Ehresman
On Tue, 29 Jul 2003, James Henstridge wrote: > I haven't wrapped g_signal_connect_object(), but it should be possible > to get a similar behaviour pretty easily with some code something like > the following (untested): I'd like something that disconnects the handler when the object is destroyed,

Re: [pygtk] PyGtk+glade2+gettext

2003-07-29 Thread Alexandr V. Demeshko
On Tue, 29 Jul 2003 09:22:23 +0800 James Henstridge <[EMAIL PROTECTED]> wrote: > >When I call from Python glade.XML("mygladefile", domain="mydomain") > >wrapper code does not use domain, instead passes it into libglade2 by > >calling glade_xml_new. And then libglade2 uses "mydomain" internally. >