471,326 Members | 1,827 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,326 software developers and data experts.

PyGTK, libglade, and signal_autoconnect

I was having a real hard time trying to accomplish something. I
couldn't find a way to automatically connect the "close" button
(clicked signal) of a GUI app I was working on, to the gtk.main_quit()
function. I had entered this handler directly with the GLADE-3
designer (I DON'T WANT TO USE A DICTIONARY, because I think that,
using GLADE, I should be able to shortcut that procedure) but in my
class the

self.wtree.signal_autoconnect(self)

wasn't working. Of course, I thought, it's looking for gtk.main_quit()
which is obviously somewhere else. So, the only solution I could think
of was to add:

self.wtree.signal_autoconnect(gtk) --- having already imported gtk,
naturally!

This automagically worked.

What I would like to know is if this is legitimate, and the right way
to go. It is basically a solution I cooked up instinctively, which
happened to work, but perhaps I am unaware of some other more
"orthodox" way of doing it.

Thank you.

Rock
Jan 4 '08 #1
0 892

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Vams | last post: by
1 post views Thread by Will Ware | last post: by
reply views Thread by zinc | last post: by
4 posts views Thread by j_mckitrick | last post: by
5 posts views Thread by Egbert Bouwman | last post: by
5 posts views Thread by Viktor | last post: by
1 post views Thread by Thomas Bartkus | last post: by
reply views Thread by Tom Grove | last post: by
reply views Thread by Michael Palmer | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.