* 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:
parent
8b8d359062
commit
768ce714f7
@ -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
|
||||
|
@ -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()
|
||||
|
@ -396,22 +396,23 @@ 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]
|
||||
self.current_list[0] = (l[0],l[1],l[2]+'\n'+data[2],l[3],l[4])
|
||||
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] == '':
|
||||
|
@ -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 '
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user