Fix problems with importing phone numbers and add support for email and web addresses

svn: r16086
This commit is contained in:
Nick Hall
2010-10-30 21:01:32 +00:00
parent 9f38cfaa21
commit bc3ceaf5dc
2 changed files with 75 additions and 14 deletions

View File

@ -1029,6 +1029,11 @@ class GedcomWriter(UpdateCallback):
self.__writeln(2, 'CTRY', addr.get_country())
if addr.get_phone():
self.__writeln(1, 'PHON', addr.get_phone())
for url in repo.get_url_list():
if int(url.get_type()) == gen.lib.UrlType.EMAIL:
self.__writeln(1, 'EMAIL', url.get_path())
elif int(url.get_type()) == gen.lib.UrlType.WEB_HOME:
self.__writeln(1, 'WWW', url.get_path())
self.__note_references(repo.get_note_list(), 1)
def __reporef(self, reporef, level):