On Sun, 25 Feb 2001, Russell Nelson wrote:
> First, I want to gush over libglade. It makes development of a
> program *incredibly* easy. You define how the program should look,
> then you create snippets of code which implement the program. And so,
> you have a program! If you're still creating pygtk widgets by hand,
> give it up.
>
> I have three libglade questions:
>
> 1) Is it so much more efficient to store the name of a widget in a
> variable than to use the WidgetWrapper trick to access it using
> win['widget']?
Looking up widgets with libglade is just a simple dictionary lookup, so it
shouldn't be a speed problem.
>
> 2) I want to catch a button_press_event on a GtkDrawable. It *ought*
> to be sufficient to define a signal handler for it, however I also had
> to do this:
> mapd = w.get_widget('map')
> mapd.set_events(GDK.EXPOSURE_MASK | GDK.BUTTON_PRESS_MASK)
> Is this strictly necessary or did I do something wrong?
Go to the basic page of the properties dialog in glade, and select the
events you want set for your widget.
>
> 3) Is there a program which can take a .glade file, and modify a .py
> file so that it matches the signal definitions with a
> GladeSignalHelper class? It would be even cooler if I could just
> click on a signal in glade, and have a text editor bring up the
> associated code. Of course, you'd need glade to print events to
> stdout, and a text editor to read them.
I have considered writing such a program to help use libglade with C, but
never got around to doing it. I don't believe there is such a program for
python though.
James.
--
Email: [EMAIL PROTECTED]
WWW: http://www.daa.com.au/~james/
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk