I tried using the GladeXML.signal_autoconnect method to attach a
function to a signal along with some extra data and noticed a couple of
problems in the bindings:

 * The signal_autoconnect method (libglade.py) has the following:
     for key, value in dict.items():
         if type(value) == type(()) and len(value) >= 2:
             hdict[key] = (<wrapper for value[0]>, value[1])
   I think value[1] should be value[1:] since the condition specifically
   checks for a tuple of size 2 or greater.

 * After extracting the value from the dictionary, connect_many
   (libglademodule.c) silently fails if it isn't a callable object,
   making it impossible to connect a handler with extra data.  It should
   also check whether the value is a tuple and, if so, whether the first
   element is a callable object before it gives up.

I've attached a patch for the above, created against the gnome-python
1.0.51 release.

pygtk.diff

Reply via email to