From 84b5a802bbf3569d3b015f1a43d65833f1790df6 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Fri, 26 May 2006 23:38:21 +0000 Subject: [PATCH] * src/BasicUtils.py (UpdateCallback.reset): Add method. (Verify.on_apply_clicked): Reset the progress. svn: r6794 --- gramps2/ChangeLog | 2 ++ gramps2/src/BasicUtils.py | 10 ++++++---- gramps2/src/plugins/Verify.py | 1 + 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 688f64f11..146595af1 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,7 +1,9 @@ 2006-05-26 Alex Roitman + * src/BasicUtils.py (UpdateCallback.reset): Add method. * src/plugins/verify.glade: update interface. * src/plugins/Verify.py: More improvements. Still need to finish filtering and object editing on double click. + (Verify.on_apply_clicked): Reset the progress. 2006-05-26 Don Allingham * src/DataViews/_RelationView.py: build skip list for SelectFamily diff --git a/gramps2/src/BasicUtils.py b/gramps2/src/BasicUtils.py index 52862ea27..d05cf80e2 100644 --- a/gramps2/src/BasicUtils.py +++ b/gramps2/src/BasicUtils.py @@ -56,14 +56,16 @@ class UpdateCallback: if '__call__' in dir(callback): # callback is really callable self.update = self.update_real self.callback = callback - - self.count = 0 - self.oldval = 0 - self.oldtime = 0 self.interval = interval + self.reset() else: self.update = self.update_empty + def reset(self): + self.count = 0 + self.oldval = 0 + self.oldtime = 0 + def set_total(self,total): self.total = total diff --git a/gramps2/src/plugins/Verify.py b/gramps2/src/plugins/Verify.py index c90b7b8e9..3422e34ff 100644 --- a/gramps2/src/plugins/Verify.py +++ b/gramps2/src/plugins/Verify.py @@ -333,6 +333,7 @@ class Verify(Tool.Tool, ManagedWindow, UpdateCallback): self.uistate.window.window.set_cursor(None) self.window.window.set_cursor(None) vr.window.window.set_cursor(None) + self.reset() # Save options self.options.handler.save_options()