Hi all,
I have created a window and a dialog in a glade file, using GtkBuilder.
The Window has some buttons in it and the dialog has just one + default 
Ok-Cancel buttons.

In the code, I use below lines to connect all signals to the defined 
functions:

    self.builder = gtk.Builder()
    self.builder.add_from_file("../data/document.glade")
    self.window = self.builder.get_object("mywindow")
    ...
    self.window.show_all()
    self.builder.connect_signals(self)

And function below is called when one of the "mywindow" buttons is clicked:

    def myFunc(self, sender):
       dialog = self.builder.get_object("mydialog")
       ...
       result = dialog.run()
       ...
       dialog.hide()

That "mydialog" has a button which is connected to a simple function to 
print something:

    def testFunc(self, sender):
       print("testing connection...")

When I run the code, "mywindow" appears and all buttons are connected to 
their functions, but when "mydialog" opens, it seems that "testFunction" 
is not connected to the button.
Where is my fault? Can gtk.builder.connect_signals connect all signals 
in a glade file, before the corresponding widgets be shown on screen?
Thanks.
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to