Enable GtkFileChooserDialog to select files OR folders
问题 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. 回答1: 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. 回答2: You could add another button. Here is a small example which illustrates how you