Commit 27746e4c authored by jvoisin's avatar jvoisin

The GUI proposes to add supported files only by default

Now, the popup to add files to the interface
only shows supported files by default. It's of course
still possible to chose to show every possible files,
but it's not the default behaviour anymore.
parent 31e1037f
......@@ -136,12 +136,6 @@ class GUI(object):
chooser.set_default_response(0)
chooser.set_select_multiple(True)
# filter that shows all files
all_filter = Gtk.FileFilter()
all_filter.set_name(_('All files'))
all_filter.add_pattern('*')
chooser.add_filter(all_filter)
# filter that shows only supported formats
supported_filter = Gtk.FileFilter()
supported_filter.set_name(_('Supported files'))
......@@ -149,6 +143,12 @@ class GUI(object):
supported_filter.add_mime_type(i)
chooser.add_filter(supported_filter)
# filter that shows all files
all_filter = Gtk.FileFilter()
all_filter.set_name(_('All files'))
all_filter.add_pattern('*')
chooser.add_filter(all_filter)
if not chooser.run(): # Gtk.STOCK_OK
filenames = chooser.get_filenames()
GLib.idle_add(self.populate(filenames).next) # asynchronous processing
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment