5746: Use the new User classes for Importers; fixed Gedcom import; added user.info()
svn: r19561
This commit is contained in:
parent
8cebcd57db
commit
525da42eec
@ -161,3 +161,10 @@ class User(gen.user.User):
|
||||
"Berkeley database. This can be repaired from "
|
||||
"the Family Tree Manager. Select the database and "
|
||||
'click on the Repair button') + '\n\n' + error)
|
||||
|
||||
def info(self, msg1, infotext, parent=None, monospaced=False):
|
||||
"""
|
||||
Displays information to the CLI
|
||||
"""
|
||||
print msg1
|
||||
print infotext
|
||||
|
@ -38,7 +38,8 @@ import sys
|
||||
#-------------------------------------------------------------------------
|
||||
import gen.user
|
||||
from gui.utils import ProgressMeter
|
||||
from QuestionDialog import WarningDialog, ErrorDialog, DBErrorDialog
|
||||
from QuestionDialog import (WarningDialog, ErrorDialog, DBErrorDialog,
|
||||
InfoDialog)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -145,3 +146,9 @@ class User(gen.user.User):
|
||||
@returns: none
|
||||
"""
|
||||
DBErrorDialog(error)
|
||||
|
||||
def info(self, msg1, infotext, parent=None, monospaced=False):
|
||||
"""
|
||||
Calls the GUI InfoDialog
|
||||
"""
|
||||
InfoDialog(msg1, infotext, parent, monospaced)
|
||||
|
@ -122,7 +122,7 @@ import LdsUtils
|
||||
import Utils
|
||||
from DateHandler._DateParser import DateParser
|
||||
from gen.db.dbconst import EVENT_KEY
|
||||
from QuestionDialog import WarningDialog, InfoDialog
|
||||
from QuestionDialog import WarningDialog
|
||||
from gen.lib.const import IDENTICAL, DIFFERENT
|
||||
from gen.lib import (StyledText, StyledTextTag, StyledTextTagType)
|
||||
|
||||
@ -1773,7 +1773,7 @@ class GedcomParser(UpdateCallback):
|
||||
def __init__(self, dbase, ifile, filename, user, stage_one,
|
||||
default_source):
|
||||
UpdateCallback.__init__(self, user.callback)
|
||||
|
||||
self.user = user
|
||||
self.set_total(stage_one.get_line_count())
|
||||
self.repo2id = {}
|
||||
self.trans = None
|
||||
@ -2573,7 +2573,7 @@ class GedcomParser(UpdateCallback):
|
||||
else:
|
||||
message = _("GEDCOM import report: %s errors detected") % \
|
||||
self.number_of_errors
|
||||
InfoDialog(message, "".join(self.errors), monospaced=True)
|
||||
self.user.info(message, "".join(self.errors), monospaced=True)
|
||||
|
||||
def __find_person_handle(self, gramps_id):
|
||||
"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user