Hi, I have a dialog as such:
def new_location_dialog(self):
t = None
dialog = gtk.Dialog("New Location", self.main_window,
gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,
(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_OK, gtk.RESPONSE_OK))
dialog.vbox.pack_start(gtk.Label("Location's name"))
entry = gtk.Entry()
entry.set_activates_default(gtk.TRUE)
print "----"
print entry.get_activates_default()
print "----"
dialog.vbox.pack_start(entry)
dialog.show_all()
response = dialog.run()
print response
if response == gtk.RESPONSE_OK:
t = entry.get_text().title()
dialog.destroy()
return t
Yet when I press enter in the entry the dialog does not close.
theprint between the lines dispalys True when run. How is the above
dialog broken and what should I do to get it to work?
Thanks
--
Rob
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/