summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjvoisin2011-08-19 21:06:44 +0200
committerjvoisin2011-08-19 21:06:44 +0200
commit433fbb48fa4a6faf3df856bdaf592a1208a322fa (patch)
tree30f573e9ad114261a50f72e0bad5e470d80744bd
parentc35483c28bec93ea3df7ac1d99befdbcf2b8a51e (diff)
Add a column for the state of the backup copy.
-rwxr-xr-xmat-gui19
1 files changed, 13 insertions, 6 deletions
diff --git a/mat-gui b/mat-gui
index 19b8444..0339763 100755
--- a/mat-gui
+++ b/mat-gui
@@ -67,7 +67,7 @@ class GUI:
67 vbox.pack_start(content, True, True, 0) 67 vbox.pack_start(content, True, True, 0)
68 68
69 # parser.class - name - type - cleaned 69 # parser.class - name - type - cleaned
70 self.liststore = gtk.ListStore(object, str, str, str) 70 self.liststore = gtk.ListStore(object, str, str, str, str)
71 71
72 treeview = gtk.TreeView(model=self.liststore) 72 treeview = gtk.TreeView(model=self.liststore)
73 treeview.set_search_column(1) # the filename column is searchable 73 treeview.set_search_column(1) # the filename column is searchable
@@ -129,7 +129,8 @@ data loss'))
129 ''' 129 '''
130 Create the columns, and add them to the treeview 130 Create the columns, and add them to the treeview
131 ''' 131 '''
132 colname = [_('Filename'), _('Mimetype'), _('State')] 132 colname = [_('Filename'), _('Mimetype'), _('State'),
133 _('State of the backup copy')]
133 134
134 for i, j in enumerate(colname): 135 for i, j in enumerate(colname):
135 filename_column = gtk.CellRendererText() 136 filename_column = gtk.CellRendererText()
@@ -286,7 +287,7 @@ data loss'))
286 cf = CFile(filename, self.backup, self.add2archive) 287 cf = CFile(filename, self.backup, self.add2archive)
287 if cf.file is not None: # if the file is supported by the mat 288 if cf.file is not None: # if the file is supported by the mat
288 self.liststore.append([cf, cf.file.basename, 289 self.liststore.append([cf, cf.file.basename,
289 cf.file.mime, _('unknow')]) 290 cf.file.mime, _('unknow'), 'None'])
290 return False 291 return False
291 else: 292 else:
292 return True 293 return True
@@ -462,9 +463,12 @@ non-anonymised) file to output archive'))
462 if self.liststore[line][3] is not _('clean'): 463 if self.liststore[line][3] is not _('clean'):
463 if self.force or not self.liststore[line][0].file.is_clean(): 464 if self.force or not self.liststore[line][0].file.is_clean():
464 self.liststore[line][0].file.remove_all() 465 self.liststore[line][0].file.remove_all()
465 self.liststore[line][3] = _('clean') 466 if self.backup: # the backup copy state
467 self.liststore[line][4] = _('clean')
468 else:
469 self.liststore[line][3] = _('clean')
466 yield True 470 yield True
467 self.statusbat.push(0, _('Ready')) 471 self.statusbar.push(0, _('Ready'))
468 yield False 472 yield False
469 473
470 def mat_clean_dirty(self, iterator): 474 def mat_clean_dirty(self, iterator):
@@ -477,7 +481,10 @@ non-anonymised) file to output archive'))
477 if self.liststore[line][3] is not _('clean'): 481 if self.liststore[line][3] is not _('clean'):
478 if self.force or not self.liststore[line][0].file.is_clean(): 482 if self.force or not self.liststore[line][0].file.is_clean():
479 self.liststore[line][0].file.remove_all_ugly() 483 self.liststore[line][0].file.remove_all_ugly()
480 self.liststore[line][3] = _('clean') 484 if self.backup: # the backup copy state
485 self.liststore[line][4] = _('clean')
486 else:
487 self.liststore[line][3] = _('clean')
481 yield True 488 yield True
482 self.statusbar.push(0, _('Ready')) 489 self.statusbar.push(0, _('Ready'))
483 yield False 490 yield False