From 6038794bad0c566de815e043b25e8f32024061f9 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sun, 2 Nov 2014 19:31:36 +0100 Subject: Simplify a bit the interface --- data/mat.glade | 633 +++++++++++++++++++++++++-------------------------------- mat-gui | 9 +- 2 files changed, 288 insertions(+), 354 deletions(-) diff --git a/data/mat.glade b/data/mat.glade index b9bbec5..6a3c33c 100644 --- a/data/mat.glade +++ b/data/mat.glade @@ -1,36 +1,27 @@ + - - - True - False - gtk-properties - - - True - False - 1 - gtk-remove - + True False gtk-about - + True False - gtk-clear + gtk-info - + True False - gtk-find + gtk-properties - + True False - gtk-info + 1 + gtk-remove @@ -42,304 +33,13 @@ - - True - False - Metadata Anonymisation Toolkit - center - 400 - 400 - - - - False - vertical - - - False - - - False - _File - True - - - True - False - - - gtk-add - True - False - True - True - - - - - - - gtk-quit - True - False - True - True - - - - - - - - - - - True - False - _Edit - True - - - True - False - - - Preferences - True - False - GtkProperties - False - - - - - - - Clear - True - False - GtkRemove - False - - - - - - - - - - True - False - _Process - True - - - True - False - - - Scour - True - False - GtkClear - False - - - - - - Check - True - False - GtkFind - False - - - - - - - - - - True - False - _Help - True - - - True - False - - - Supported formats - True - False - GtkInfo - False - - - - - - About - True - False - GtkAbout - False - - - - - - - - - - False - True - 0 - - - - - False - both - 5 - - - True - False - Add - gtk-add - - - - False - True - - - - - True - False - Scour - gtk-clear - - - - False - True - - - - - True - False - Check - gtk-find - - - - False - True - - - - - True - False - Clear - gtk-remove - - - - False - True - - - - - False - True - 1 - - - - - False - - - False - - MainWindowListstore - True - 1 - True - True - - - - - multiple - - - - - True - fixed - Filename - True - True - True - 1 - - - - 1 - - - - - - - True - fixed - State - True - True - True - 2 - - - - 2 - - - - - - - - - True - True - 3 - - - - - False - - - False - True - 4 - - - - + + + + + + + False @@ -370,6 +70,9 @@ True 0 True + + + fixed @@ -433,19 +136,11 @@ 1 - - - - MetadataPopupOKButton - - - - - - - - - + + + + MetadataPopupOKButton + False @@ -476,8 +171,6 @@ 1 1 - 1 - 1 @@ -488,8 +181,6 @@ 0 1 - 1 - 1 @@ -501,8 +192,6 @@ 0 2 - 1 - 1 @@ -514,8 +203,6 @@ 0 3 - 1 - 1 @@ -527,8 +214,6 @@ 0 4 - 1 - 1 @@ -536,8 +221,6 @@ False 5 True - 1 - 1 @@ -548,8 +231,6 @@ 1 0 - 1 - 1 @@ -562,8 +243,6 @@ 0 0 - 1 - 1 @@ -576,8 +255,6 @@ 1 2 - 1 - 1 @@ -590,8 +267,6 @@ 1 4 - 1 - 1 @@ -604,8 +279,6 @@ 1 3 - 1 - 1 @@ -646,4 +319,262 @@ supported_OK + + True + False + gtk-clear + + + True + False + Metadata Anonymisation Toolkit + center + 400 + 400 + + + + False + vertical + + + False + + + False + _File + True + + + True + False + + + gtk-add + True + False + True + True + True + + + + + + + Clean + True + False + True + image1 + False + True + + + + + + gtk-quit + True + False + True + True + True + + + + + + + + + + + True + False + _Edit + True + + + True + False + + + Preferences + True + False + GtkProperties + False + + + + + + + Clear + True + False + GtkRemove + False + + + + + + + + + + True + False + _Help + True + + + True + False + + + Supported formats + True + False + GtkInfo + False + + + + + + About + True + False + GtkAbout + False + + + + + + + + + + False + True + 0 + + + + + False + both + 5 + + + True + False + Add + gtk-add + + + + False + True + + + + + True + False + Scour + gtk-clear + + + + False + True + + + + + False + True + 1 + + + + + False + + + False + + MainWindowListstore + True + 1 + True + True + + + + + multiple + + + + + True + fixed + Filename + True + True + True + 1 + + + + 1 + + + + + + + True + fixed + State + True + True + True + 2 + + + + 2 + + + + + + + + + True + True + 3 + + + + + False + + + False + True + 4 + + + + + diff --git a/mat-gui b/mat-gui index 5de5865..7defe8b 100755 --- a/mat-gui +++ b/mat-gui @@ -132,15 +132,17 @@ class GUI(object): chooser.set_default_response(0) chooser.set_select_multiple(True) - all_filter = Gtk.FileFilter() # filter that shows all files + # 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.add_mime_type(i) for i in strippers.STRIPPERS.keys()] supported_filter.set_name(_('Supported files')) + for i in strippers.STRIPPERS.keys(): + supported_filter.add_mime_type(i) chooser.add_filter(supported_filter) if not chooser.run(): # Gtk.STOCK_OK @@ -155,8 +157,8 @@ class GUI(object): metadataPopupListStore = self.builder.get_object('MetadataPopupListStore') metadataPopupListStore.clear() if self.liststore[row][0].file.is_clean(): - metadataPopupListStore.append([_('No metadata found'), '']) self.liststore[row][2] = _('Clean') + metadataPopupListStore.append([_('No metadata found'), '']) else: self.liststore[row][2] = _('Dirty') for i, j in self.liststore[row][0].file.get_meta().iteritems(): @@ -300,6 +302,7 @@ non-anonymised) file to output archive')) if self.__add_file_to_treeview(filename): not_supported.append(filename) yield True + self.cb_mat_check(None) if not_supported: self.__popup_non_supported(not_supported) yield False -- cgit v1.3