> the two button are connected (when clicked) to infoButton(self, 
> widget, 
> data=None)

From documentation:
handler_id = object.connect(name, func, func_data)

So:

button1.connect(when is pressed, your_function, 1)
button2.connect(when is pressed, your_function, 2)
(This code is conception, I don't really know how is done in GTK).

On the callback:
infoButton(self, widget, data=None):
        # discover wich button was pressed
        ...
        # say hello to the button
        if data == 1:
                print "Hi, button1!"
        else:
                print "Hi, button2!"

-- 
  Claudiu Nicolaie CISMARU
  GNU GPG Key: http://claudiu.targujiu.net/key.gpg
  T: +40 755 135455
  E: clau...@virtuamagic.com, claudiu.cism...@gmail.com

Attachment: signature.asc
Description: This is a digitally signed message part.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to