* src/SourceView.py: fix source query dialog

* src/ansel_utf8.py: fix unicode conversion
* src/GrampsDb/_GrampsDbBase.py: fix surname detection
* src/GrampsDb/_ReadGedcomp.py: fix note importation


svn: r5893
This commit is contained in:
Don Allingham 2006-02-07 03:07:31 +00:00
parent 8b8d359062
commit 768ce714f7
5 changed files with 19 additions and 10 deletions

View File

@ -1,4 +1,8 @@
2006-02-06 Don Allingham <don@gramps-project.org>
* src/SourceView.py: fix source query dialog
* src/ansel_utf8.py: fix unicode conversion
* src/GrampsDb/_GrampsDbBase.py: fix surname detection
* src/GrampsDb/_ReadGedcomp.py: fix note importation
* src/EditFamily.py: Complete save operation, handle new family
* src/EditMedia.py: Add file selector button
* src/FamilyList.py: Save properly

View File

@ -964,7 +964,7 @@ class GrampsDbBase(GrampsDBCallback):
cursor = self.get_person_cursor()
data = cursor.first()
while data:
slist.append((data[1][3].sname,data[0]))
slist.append((data[1][3][3],data[0]))
data = cursor.next()
cursor.close()
slist.sort()

View File

@ -396,14 +396,15 @@ class Reader:
try:
val = self.cnv(val)
except:
val = line[2].translate(val,self.transtable2)
val = self.cnv(line[2].translate(val,self.transtable2))
try:
level = int(line[0])
except:
level = 0
data = (level,tokens.get(line[1],TOKEN_UNKNOWN),val,line[1],self.index)
data = (level,tokens.get(line[1],TOKEN_UNKNOWN),val,
self.cnv(line[1]),self.index)
if data[1] == TOKEN_CONT:
l = self.current_list[0]
@ -411,7 +412,7 @@ class Reader:
elif data[1] == TOKEN_CONC:
l = self.current_list[0]
if self.broken_conc:
new_value = "%s %s" % (l[2],data[2])
new_value = u"%s %s" % (l[2],data[2])
else:
new_value = l[2] + data[2]
self.current_list[0] = (l[0],l[1],new_value,l[3],l[4])
@ -1157,9 +1158,12 @@ class GedcomParser:
return u""
else:
if old_note:
note = "%s\n%s" % (old_note,matches[2])
note = u"%s\n%s" % (old_note,matches[2])
else:
note = matches[2]
if type(note) != unicode:
print type(note),type(matches[2])
task(note)
self.ignore_sub_junk(level+1)
return note
@ -1180,6 +1184,7 @@ class GedcomParser:
if int(matches[0]) < 1:
self.backup()
if state.get_text():
print state
state.person.set_note(state.get_text())
return
else:
@ -2018,7 +2023,7 @@ class GedcomParser:
self.parse_person_object(2,state)
def func_person_note(self,matches,state):
self.note = self.parse_note(matches,self.person,1,state)#self.note)
self.note = self.parse_note(matches,self.person,1,state.note)
def func_person_sex(self,matches,state):
if matches[2] == '':

View File

@ -130,8 +130,8 @@ class SourceView(PageView.ListView):
event = db.get_event_from_handle(event_handle)
ans = EditSource.DelSourceQuery(event,db,
person_list,family_list)
ans = EditSource.DelSrcQuery(event,db,
person_list,family_list)
if len(person_list) + len(family_list) > 0:
msg = _('This source is currently being used. Deleting it '

View File

@ -302,7 +302,7 @@ def ansel_to_utf8(s):
head = s[0]
s = s[1:]
buff.write(head)
ans = buff.getvalue()
ans = unicode(buff.getvalue())
buff.close()
return ans