I would like to ask if anyone knows how to use the filechooser dialog in glade and pygtk. (It should be very similar in any of the language bindings, and that is why I didn't specify the language.) Basically, the filechooser now looks like this: there are two columns, one for the folders (left), and one for the files (right). Then at the bottom of the dialog, there are two empty slots for two buttons, so I just dropped a cancel and an OK button there. But then my question is what does the dialog return? My code looks like this:
filename = None
response = self.widget('filechooserdialog').run()
print response
#if response == Gtk.RESPONSE_OK:
filename = self.widget('filechooserdialog').get_filename()
self.widget('filechooserdialog').hide()
and at the moment, the callback to 'Cancel' and 'OK' just hides the dialog. But I can't find out what the dialog is supposed to return. In other words, how can I specify in the response whether the 'Cancel', or the 'OK' button was pressed?
Thanks,
v923z
PS: Here is an image to illustrate the situation: