* src/ViewManager.py: attribution for icons

* src/GrampsDbUtils/_GedcomParse.py: enhancements in parsing
	* src/GrampsDbUtils/_GedcomTokens.py: remove double AGNC


svn: r8241
This commit is contained in:
Don Allingham 2007-02-26 05:14:50 +00:00
parent 18984b840e
commit 660b03cf05
4 changed files with 25 additions and 11 deletions

View File

@ -1,4 +1,7 @@
2007-02-25 Don Allingham <don@gramps-project.org>
* 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

View File

@ -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,6 +3588,7 @@ class GedcomParser(UpdateCallback):
@type state: CurrentState
"""
(file_ok, filename) = self.find_file(line.data, self.dir_path)
if media != URL:
if not file_ok:
self.warn(_("Could not import %s") % filename[0])
path = filename[0].replace('\\', os.path.sep)

View File

@ -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

View File

@ -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', ''))