* 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:
@ -85,16 +85,18 @@ _sn_prefix_re = re.compile("^\s*(%s)\s+(.*)" % '|'.join(prefix_list),
|
||||
# PatchNames
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class PatchNames(Tool.Tool, ManagedWindow.ManagedWindow):
|
||||
class PatchNames(Tool.BatchTool, ManagedWindow.ManagedWindow):
|
||||
|
||||
def __init__(self, dbstate, uistate, options_class, name, callback=None):
|
||||
self.label = _('Name and title extraction tool')
|
||||
|
||||
Tool.Tool.__init__(self, dbstate, options_class, name)
|
||||
Tool.BatchTool.__init__(self, dbstate, options_class, name)
|
||||
if self.fail:
|
||||
return
|
||||
ManagedWindow.ManagedWindow.__init__(self,uistate,[],self.__class__)
|
||||
|
||||
self.cb = callback
|
||||
self.trans = self.db.transaction_begin()
|
||||
self.trans = self.db.transaction_begin("",batch=True)
|
||||
self.title_list = []
|
||||
self.nick_list = []
|
||||
self.prefix1_list = []
|
||||
|
Reference in New Issue
Block a user