Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GTK+ Filechooser to open both files and folders

How do I get my filechooser to be able to select both files and folders when the open button on the filechooser dialog is hit ? I want to squeeze the ability to open files and filders in just one filechooser. I am using GTK+ and Python.

like image 455
thotheolh Avatar asked Dec 07 '10 12:12

thotheolh


1 Answers

I was thinking about this, and although in your comments you've decided to go another route, I do have a suggestion: Write your own file chooser subclass of the GTK+ one and provide two "Open" buttons, one to "Open File" and another to "Open Directory". That would eliminate the ambiguity discussed above.

like image 93
Ken Kinder Avatar answered Oct 03 '22 09:10

Ken Kinder