diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index cc2e1750c..c269a5abb 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -14,6 +14,12 @@ (change_db): Use supplied database. * src/SourceView.py (__init__): dont call change_cb because on initialisation there is no real database and this will be done by the signal. + + * src/plugins/ChangeNames.py: Block signal emission during run + * src/plugins/Check.py: Block signal emission during run + * src/plugins/ImportGeneWeb.py: Block signal emission during run + * src/plugins/ImportvCard.py: Block signal emission during run + * src/plugins/TestcaseGenerator.py: Block signal emission during run 2005-04-06 Richard Taylor * src/plugins/ScratchPad.py: made clear buttons sensitive to contents of diff --git a/gramps2/src/plugins/ChangeNames.py b/gramps2/src/plugins/ChangeNames.py index e53f40256..d644c8317 100644 --- a/gramps2/src/plugins/ChangeNames.py +++ b/gramps2/src/plugins/ChangeNames.py @@ -78,8 +78,6 @@ class ChangeNames: self.parent.child_windows[self.__class__].present(None) return self.win_key = self.__class__ - self.trans = db.transaction_begin() - self.trans.set_batch(True) self.name_list = [] for name in self.db.get_surname_list(): @@ -164,6 +162,9 @@ class ChangeNames: self.window.present() def on_ok_clicked(self,obj): + self.trans = self.db.transaction_begin() + self.trans.set_batch(True) + self.db.disable_signals() changelist = [] for node in self.iter_list: if self.model.get_value(node,0): @@ -182,8 +183,9 @@ class ChangeNames: if change: self.db.commit_person(person,self.trans) - if anychange: - self.db.transaction_commit(self.trans,_("Capitalization changes")) + self.db.transaction_commit(self.trans,_("Capitalization changes")) + self.db.enable_signals() + self.db.request_rebuild() self.close(obj) self.cb(None,1) diff --git a/gramps2/src/plugins/Check.py b/gramps2/src/plugins/Check.py index a2381ae85..63996839e 100644 --- a/gramps2/src/plugins/Check.py +++ b/gramps2/src/plugins/Check.py @@ -59,6 +59,7 @@ def runTool(database,active_person,callback,parent=None): try: trans = database.transaction_begin() trans.set_batch(True) + database.disable_signals() checker = CheckIntegrity(database,parent,trans) checker.check_for_broken_family_links() checker.cleanup_missing_photos(0) @@ -66,6 +67,8 @@ def runTool(database,active_person,callback,parent=None): checker.cleanup_empty_families(0) checker.check_events() database.transaction_commit(trans, _("Check Integrity")) + database.enable_signals() + database.request_rebuild() errs = checker.build_report(0) if errs: diff --git a/gramps2/src/plugins/ImportGeneWeb.py b/gramps2/src/plugins/ImportGeneWeb.py index 89a3d75fa..7722189e1 100644 --- a/gramps2/src/plugins/ImportGeneWeb.py +++ b/gramps2/src/plugins/ImportGeneWeb.py @@ -106,6 +106,8 @@ class GeneWebParser: def parse_geneweb_file(self): self.trans = self.db.transaction_begin() + self.trans.set_batch(True) + self.db.disable_signals() t = time.time() self.index = 0 self.fam_count = 0 @@ -155,6 +157,8 @@ class GeneWebParser: msg = _('Import Complete: %d seconds') % t self.db.transaction_commit(self.trans,_("GeneWeb import")) + self.db.enable_signals() + self.db.request_rebuild() print msg print "Families: %d" % len(self.fkeys) diff --git a/gramps2/src/plugins/ImportvCard.py b/gramps2/src/plugins/ImportvCard.py index 0aa709cc3..10e3589a5 100644 --- a/gramps2/src/plugins/ImportvCard.py +++ b/gramps2/src/plugins/ImportvCard.py @@ -104,6 +104,8 @@ class VCardParser: def parse_vCard_file(self): self.trans = self.db.transaction_begin() + self.trans.set_batch(True) + self.db.disable_signals() t = time.time() self.person = None @@ -156,6 +158,8 @@ class VCardParser: msg = _('Import Complete: %d seconds') % t self.db.transaction_commit(self.trans,_("vCard import")) + self.db.enable_signals() + self.db.request_rebuild() return None diff --git a/gramps2/src/plugins/TestcaseGenerator.py b/gramps2/src/plugins/TestcaseGenerator.py index 119cec75d..b4e26dbb9 100644 --- a/gramps2/src/plugins/TestcaseGenerator.py +++ b/gramps2/src/plugins/TestcaseGenerator.py @@ -125,6 +125,7 @@ class TestcaseGenerator: self.trans = self.db.transaction_begin() self.trans.set_batch(True) + self.db.disable_signals() if generate_bugs: self.generate_broken_relations() @@ -145,6 +146,8 @@ class TestcaseGenerator: break self.db.transaction_commit(self.trans,_("Testcase generator")) + self.db.enable_signals() + self.db.request_rebuild() self.top.destroy()