Enable GtkFileChooserDialog to select files OR folders

filechooser, gtk, pygtk, ubuntu

Solution

Unfortunately I don't think this is possible.

I played around with this a bit in the "create a torrent" dialog in Transmission, and wound up using a radibox to enable one of two chooserdialogbuttons, one in file mode and the other in folder mode.

Problem

Using GTK+'s GtkFileChooserDialog, how can I allow the user to select a file or a folder (both are valid here). The actions available are mutually exclusive.

Original source