From 433fbb48fa4a6faf3df856bdaf592a1208a322fa Mon Sep 17 00:00:00 2001 From: jvoisin Date: Fri, 19 Aug 2011 21:06:44 +0200 Subject: Add a column for the state of the backup copy. --- mat-gui | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'mat-gui') diff --git a/mat-gui b/mat-gui index 19b8444..0339763 100755 --- a/mat-gui +++ b/mat-gui @@ -67,7 +67,7 @@ class GUI: vbox.pack_start(content, True, True, 0) # parser.class - name - type - cleaned - self.liststore = gtk.ListStore(object, str, str, str) + self.liststore = gtk.ListStore(object, str, str, str, str) treeview = gtk.TreeView(model=self.liststore) treeview.set_search_column(1) # the filename column is searchable @@ -129,7 +129,8 @@ data loss')) ''' Create the columns, and add them to the treeview ''' - colname = [_('Filename'), _('Mimetype'), _('State')] + colname = [_('Filename'), _('Mimetype'), _('State'), + _('State of the backup copy')] for i, j in enumerate(colname): filename_column = gtk.CellRendererText() @@ -286,7 +287,7 @@ data loss')) cf = CFile(filename, self.backup, self.add2archive) if cf.file is not None: # if the file is supported by the mat self.liststore.append([cf, cf.file.basename, - cf.file.mime, _('unknow')]) + cf.file.mime, _('unknow'), 'None']) return False else: return True @@ -462,9 +463,12 @@ non-anonymised) file to output archive')) if self.liststore[line][3] is not _('clean'): if self.force or not self.liststore[line][0].file.is_clean(): self.liststore[line][0].file.remove_all() - self.liststore[line][3] = _('clean') + if self.backup: # the backup copy state + self.liststore[line][4] = _('clean') + else: + self.liststore[line][3] = _('clean') yield True - self.statusbat.push(0, _('Ready')) + self.statusbar.push(0, _('Ready')) yield False def mat_clean_dirty(self, iterator): @@ -477,7 +481,10 @@ non-anonymised) file to output archive')) if self.liststore[line][3] is not _('clean'): if self.force or not self.liststore[line][0].file.is_clean(): self.liststore[line][0].file.remove_all_ugly() - self.liststore[line][3] = _('clean') + if self.backup: # the backup copy state + self.liststore[line][4] = _('clean') + else: + self.liststore[line][3] = _('clean') yield True self.statusbar.push(0, _('Ready')) yield False -- cgit v1.3