summaryrefslogtreecommitdiff
path: root/mat-gui
diff options
context:
space:
mode:
authorjvoisin2012-02-15 15:20:25 +0100
committerjvoisin2012-02-15 15:20:25 +0100
commitd9f6a5ddb1cdc02a460e0398d591fadaebaaf22b (patch)
treeaa34e3afc1da4b42f78676a2005b7abdc095296b /mat-gui
parent2aa1c06b0d280b42293af25f8aaa808649cdd71b (diff)
Print only supported fileformat in the GUI
The "supported formats" dialog now only show format that are really localy supported.
Diffstat (limited to 'mat-gui')
-rwxr-xr-xmat-gui31
1 files changed, 17 insertions, 14 deletions
diff --git a/mat-gui b/mat-gui
index 1249cd6..a0c560d 100755
--- a/mat-gui
+++ b/mat-gui
@@ -361,21 +361,24 @@ class GUI:
361 i.set_expanded(False) 361 i.set_expanded(False)
362 362
363 for item in handler.list: # list of dict : one dict per format 363 for item in handler.list: # list of dict : one dict per format
364 #create one expander per format 364 # create one expander per format
365 title = '%s (%s)' % (item['name'], item['extension']) 365 # only if the format is supported
366 support = ('\t<b>%s</b> : %s' % ('support', item['support'])) 366 if strippers.STRIPPERS.has_key(item['mimetype'].split(',')[0]):
367 metadata = '\n\t<b>metadata</b> : ' + item['metadata'] 367 # some format have more than one mimetype
368 method = '\n\t<b>method</b> : ' + item['method'] 368 title = '%s (%s)' % (item['name'], item['extension'])
369 content = support + metadata + method 369 support = ('\t<b>%s</b> : %s' % ('support', item['support']))
370 if item['support'] == 'partial': 370 metadata = '\n\t<b>metadata</b> : ' + item['metadata']
371 content += '\n\t<b>remaining</b> : ' + item['remaining'] 371 method = '\n\t<b>method</b> : ' + item['method']
372 content = support + metadata + method
373 if item['support'] == 'partial':
374 content += '\n\t<b>remaining</b> : ' + item['remaining']
372 375
373 expander = gtk.Expander(title) 376 expander = gtk.Expander(title)
374 vbox.pack_start(expander, False, False, 0) 377 vbox.pack_start(expander, False, False, 0)
375 label = gtk.Label() 378 label = gtk.Label()
376 label.set_markup(content) 379 label.set_markup(content)
377 expander.add(label) 380 expander.add(label)
378 expander.connect('activate', expander_callback) 381 expander.connect('activate', expander_callback)
379 382
380 dialog.show_all() 383 dialog.show_all()
381 click = dialog.run() 384 click = dialog.run()