* src/PluginUtils/_Tool.py (BatchTool): Add class taking care of

tools with batch transactions.
	(ActivePersonTool.pass): Remove method.
	* src/plugins/Check.py (Check): Derive from BatchTool.
	* src/plugins/ReorderIds.py (ReorderIds): Use batch transactions;
	derive from BatchTool.
	* src/plugins/ChangeTypes.py (ChangeTypes): Use batch
	transactions; derive from BatchTool. 
	* src/plugins/ChangeNames.py (ChangeNames): Derive from BatchTool.
	* src/plugins/PatchNames.py (PatchNames): Use batch transactions;
	derive from BatchTool.
	* src/glade/gramps.glade: Make both buttons' lables in
	questiondialog use underline property.
	(ViewManager.import_data): Add undo warning for imports.


svn: r6540
This commit is contained in:
Alex Roitman
2006-05-04 02:05:50 +00:00
parent 115e268aec
commit 25ada65064
9 changed files with 90 additions and 24 deletions

View File

@ -56,11 +56,13 @@ from PluginUtils import Tool, register_tool
#
#
#-------------------------------------------------------------------------
class ChangeTypes(Tool.Tool, ManagedWindow.ManagedWindow):
class ChangeTypes(Tool.BatchTool, ManagedWindow.ManagedWindow):
def __init__(self, dbstate, uistate, options_class, name, callback=None):
Tool.Tool.__init__(self, dbstate, options_class, name)
Tool.BatchTool.__init__(self, dbstate, options_class, name)
if self.fail:
return
if uistate:
self.title = _('Change Event Types')
@ -110,7 +112,7 @@ class ChangeTypes(Tool.Tool, ManagedWindow.ManagedWindow):
modified = 0
self.trans = self.db.transaction_begin()
self.trans = self.db.transaction_begin("",batch=True)
if not cli:
progress = Utils.ProgressMeter(_('Analyzing events'),'')
progress.set_pass('',self.db.get_number_of_people())