Greetings list! I've setup GtkRadioButtons containing GtkSpinButtons with glade. When I load and display the glade-file no events are received by the embedded GtkSpinButtons. How is this supposed to work? How can I make sure the radio-buttons don't "swallow" the events and let them propagate to the child-widgets? See the attached glade- and python-file. Best regards... Mirco
Attachment:
ui.glade
Description: application/glade
#!/usr/bin/python import pygtk pygtk.require ('2.0') import gtk.glade class Ui: window = None radioButtons = [None, None, None] spinButtons = [None, None, None, None] def on_delete (self, widget, data = None): gtk.main_quit () def on_value_changed (self, widget, data): print data, widget.get_value () def setup_stuff (self): # load ui-description xml = gtk.glade.XML ("./ui.glade") # get all widgets self.window = xml.get_widget ("window") self.spinButtons[0] = xml.get_widget ("spinbutton1") self.radioButtons[0] = xml.get_widget ("radiobutton1") self.spinButtons[1] = xml.get_widget ("spinbutton2") self.radioButtons[1] = xml.get_widget ("radiobutton2") self.spinButtons[2] = xml.get_widget ("spinbutton3") self.radioButtons[2] = xml.get_widget ("radiobutton3") self.spinButtons[3] = xml.get_widget ("spinbutton4") # connect signals self.window.connect ("delete_event", self.on_delete) self.spinButtons[0].connect ("value-changed", self.on_value_changed, "spinbutton1:") self.spinButtons[1].connect ("value-changed", self.on_value_changed, "spinbutton2:") self.spinButtons[2].connect ("value-changed", self.on_value_changed, "spinbutton3:") self.spinButtons[3].connect ("value-changed", self.on_value_changed, "spinbutton4:") # display everything self.window.show_all () def __init__ (self): self.setup_stuff () def main (): gtk.main () return 0 if __name__ == "__main__": Ui () main ()
_______________________________________________ gtk-list mailing list gtk-list@xxxxxxxxx http://mail.gnome.org/mailman/listinfo/gtk-list