From 660b03cf0511698ac94a7c204acda36314a9e33a Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Mon, 26 Feb 2007 05:14:50 +0000 Subject: [PATCH] * src/ViewManager.py: attribution for icons * src/GrampsDbUtils/_GedcomParse.py: enhancements in parsing * src/GrampsDbUtils/_GedcomTokens.py: remove double AGNC svn: r8241 --- ChangeLog | 3 +++ src/GrampsDbUtils/_GedcomParse.py | 25 +++++++++++++++---------- src/GrampsDbUtils/_GedcomTokens.py | 1 - src/ViewManager.py | 7 +++++++ 4 files changed, 25 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 76250e55b..6eb62cdc0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,7 @@ 2007-02-25 Don Allingham + * src/ViewManager.py: attribution for icons + * src/GrampsDbUtils/_GedcomParse.py: enhancements in parsing + * src/GrampsDbUtils/_GedcomTokens.py: remove double AGNC * src/DataViews/__init__.py: Add NoteView * src/DataViews/_NoteView.py: Added * src/Config/_GrampsConfigKeys.py: Added new keys to handle note dialog diff --git a/src/GrampsDbUtils/_GedcomParse.py b/src/GrampsDbUtils/_GedcomParse.py index d7a02be2b..bca93ac58 100644 --- a/src/GrampsDbUtils/_GedcomParse.py +++ b/src/GrampsDbUtils/_GedcomParse.py @@ -1028,6 +1028,8 @@ class GedcomParser(UpdateCallback): msg = _("Line %d was not understood, so it was ignored.") % text self.warn(msg) self.error_count += 1 + import sys + sys.exit(1) self.skip_subordinate_levels(level) def warn(self, msg): @@ -1153,9 +1155,9 @@ class GedcomParser(UpdateCallback): self.backoff = True return else: + func = func_map.get(line.token, default) if self.debug: print line - func = func_map.get(line.token, default) func(line, state) def func_undefined(self, line, state): @@ -2913,14 +2915,15 @@ class GedcomParser(UpdateCallback): @param state: The current state @type state: CurrentState """ - state.location = RelLib.Location() - state.location.set_street(line.data) - state.note = [] + sub_state = GedcomUtils.CurrentState(level=state.level+1) + sub_state.location = RelLib.Location() + sub_state.location.set_street(line.data) + sub_state.note = [] - self.parse_level(state, self.parse_loc_tbl, self.func_undefined) + self.parse_level(sub_state, self.parse_loc_tbl, self.func_undefined) - location = state.location - note_list = state.note + location = sub_state.location + note_list = sub_state.note place_handle = state.event.get_place_handle() if place_handle: @@ -3262,7 +3265,7 @@ class GedcomParser(UpdateCallback): @param state: The current state @type state: CurrentState """ - date, text = self.parse_source_data(state.level+1) + date, text = self.parse_source_data(state.level+2) if date: state.src_ref.set_date_object(date) state.src_ref.set_text(text) @@ -3574,6 +3577,7 @@ class GedcomParser(UpdateCallback): @type state: CurrentState """ # TODO: FIX THIS!!! + state.media_form = line.data.strip() self.skip_subordinate_levels(state.level+1) def func_obje_file(self, line, state): @@ -3584,8 +3588,9 @@ class GedcomParser(UpdateCallback): @type state: CurrentState """ (file_ok, filename) = self.find_file(line.data, self.dir_path) - if not file_ok: - self.warn(_("Could not import %s") % filename[0]) + if media != URL: + if not file_ok: + self.warn(_("Could not import %s") % filename[0]) path = filename[0].replace('\\', os.path.sep) state.media.set_path(path) state.media.set_mime_type(Mime.get_type(path)) diff --git a/src/GrampsDbUtils/_GedcomTokens.py b/src/GrampsDbUtils/_GedcomTokens.py index 57619f34a..12ff20217 100644 --- a/src/GrampsDbUtils/_GedcomTokens.py +++ b/src/GrampsDbUtils/_GedcomTokens.py @@ -129,7 +129,6 @@ TOKEN__LKD = 109 TOKEN_BLOB = 110 TOKEN_CONL = 111 TOKEN_AGE = 112 -TOKEN_AGNC = 113 TOKEN_RESN = 114 TOKEN_ID = 115 TOKEN_GEVENT = 116 diff --git a/src/ViewManager.py b/src/ViewManager.py index ff770d4df..2b882b4ef 100644 --- a/src/ViewManager.py +++ b/src/ViewManager.py @@ -668,6 +668,13 @@ class ViewManager: about.set_name(const.program_name) about.set_version(const.version) about.set_copyright(const.copyright_msg) + about.set_artists([ + _("Much of GRAMPS' artwork is either from\n" + "the Tango Project or derived from the Tango\n" + "Project. This artwork is released under the\n" + "Create Commons Attribution-ShareAlike 2.5\n" + "license.") + ]) try: ifile = open(const.license_file, "r") about.set_license(ifile.read().replace('\x0c', ''))