summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjvoisin2015-12-19 20:15:38 +0100
committerjvoisin2015-12-19 20:15:38 +0100
commit27746e4cd822cf80d467fdff40f3e7509a0d9af2 (patch)
tree597d563b5fb13781186514144c2e1c18ec71af06
parent31e1037fb6cbc2ee68a7c10ba322922aafc0d5ae (diff)
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.
-rwxr-xr-xmat-gui12
1 files changed, 6 insertions, 6 deletions
diff --git a/mat-gui b/mat-gui
index 25ec86f..e313251 100755
--- a/mat-gui
+++ b/mat-gui
@@ -136,12 +136,6 @@ class GUI(object):
136 chooser.set_default_response(0) 136 chooser.set_default_response(0)
137 chooser.set_select_multiple(True) 137 chooser.set_select_multiple(True)
138 138
139 # filter that shows all files
140 all_filter = Gtk.FileFilter()
141 all_filter.set_name(_('All files'))
142 all_filter.add_pattern('*')
143 chooser.add_filter(all_filter)
144
145 # filter that shows only supported formats 139 # filter that shows only supported formats
146 supported_filter = Gtk.FileFilter() 140 supported_filter = Gtk.FileFilter()
147 supported_filter.set_name(_('Supported files')) 141 supported_filter.set_name(_('Supported files'))
@@ -149,6 +143,12 @@ class GUI(object):
149 supported_filter.add_mime_type(i) 143 supported_filter.add_mime_type(i)
150 chooser.add_filter(supported_filter) 144 chooser.add_filter(supported_filter)
151 145
146 # filter that shows all files
147 all_filter = Gtk.FileFilter()
148 all_filter.set_name(_('All files'))
149 all_filter.add_pattern('*')
150 chooser.add_filter(all_filter)
151
152 if not chooser.run(): # Gtk.STOCK_OK 152 if not chooser.run(): # Gtk.STOCK_OK
153 filenames = chooser.get_filenames() 153 filenames = chooser.get_filenames()
154 GLib.idle_add(self.populate(filenames).next) # asynchronous processing 154 GLib.idle_add(self.populate(filenames).next) # asynchronous processing