* 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>
|
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/EditFamily.py: Complete save operation, handle new family
|
||||||
* src/EditMedia.py: Add file selector button
|
* src/EditMedia.py: Add file selector button
|
||||||
* src/FamilyList.py: Save properly
|
* src/FamilyList.py: Save properly
|
||||||
|
@ -964,7 +964,7 @@ class GrampsDbBase(GrampsDBCallback):
|
|||||||
cursor = self.get_person_cursor()
|
cursor = self.get_person_cursor()
|
||||||
data = cursor.first()
|
data = cursor.first()
|
||||||
while data:
|
while data:
|
||||||
slist.append((data[1][3].sname,data[0]))
|
slist.append((data[1][3][3],data[0]))
|
||||||
data = cursor.next()
|
data = cursor.next()
|
||||||
cursor.close()
|
cursor.close()
|
||||||
slist.sort()
|
slist.sort()
|
||||||
|
@ -396,14 +396,15 @@ class Reader:
|
|||||||
try:
|
try:
|
||||||
val = self.cnv(val)
|
val = self.cnv(val)
|
||||||
except:
|
except:
|
||||||
val = line[2].translate(val,self.transtable2)
|
val = self.cnv(line[2].translate(val,self.transtable2))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
level = int(line[0])
|
level = int(line[0])
|
||||||
except:
|
except:
|
||||||
level = 0
|
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:
|
if data[1] == TOKEN_CONT:
|
||||||
l = self.current_list[0]
|
l = self.current_list[0]
|
||||||
@ -411,7 +412,7 @@ class Reader:
|
|||||||
elif data[1] == TOKEN_CONC:
|
elif data[1] == TOKEN_CONC:
|
||||||
l = self.current_list[0]
|
l = self.current_list[0]
|
||||||
if self.broken_conc:
|
if self.broken_conc:
|
||||||
new_value = "%s %s" % (l[2],data[2])
|
new_value = u"%s %s" % (l[2],data[2])
|
||||||
else:
|
else:
|
||||||
new_value = l[2] + data[2]
|
new_value = l[2] + data[2]
|
||||||
self.current_list[0] = (l[0],l[1],new_value,l[3],l[4])
|
self.current_list[0] = (l[0],l[1],new_value,l[3],l[4])
|
||||||
@ -1157,9 +1158,12 @@ class GedcomParser:
|
|||||||
return u""
|
return u""
|
||||||
else:
|
else:
|
||||||
if old_note:
|
if old_note:
|
||||||
note = "%s\n%s" % (old_note,matches[2])
|
note = u"%s\n%s" % (old_note,matches[2])
|
||||||
else:
|
else:
|
||||||
note = matches[2]
|
note = matches[2]
|
||||||
|
if type(note) != unicode:
|
||||||
|
print type(note),type(matches[2])
|
||||||
|
|
||||||
task(note)
|
task(note)
|
||||||
self.ignore_sub_junk(level+1)
|
self.ignore_sub_junk(level+1)
|
||||||
return note
|
return note
|
||||||
@ -1180,6 +1184,7 @@ class GedcomParser:
|
|||||||
if int(matches[0]) < 1:
|
if int(matches[0]) < 1:
|
||||||
self.backup()
|
self.backup()
|
||||||
if state.get_text():
|
if state.get_text():
|
||||||
|
print state
|
||||||
state.person.set_note(state.get_text())
|
state.person.set_note(state.get_text())
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
@ -2018,7 +2023,7 @@ class GedcomParser:
|
|||||||
self.parse_person_object(2,state)
|
self.parse_person_object(2,state)
|
||||||
|
|
||||||
def func_person_note(self,matches,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):
|
def func_person_sex(self,matches,state):
|
||||||
if matches[2] == '':
|
if matches[2] == '':
|
||||||
|
@ -130,8 +130,8 @@ class SourceView(PageView.ListView):
|
|||||||
|
|
||||||
event = db.get_event_from_handle(event_handle)
|
event = db.get_event_from_handle(event_handle)
|
||||||
|
|
||||||
ans = EditSource.DelSourceQuery(event,db,
|
ans = EditSource.DelSrcQuery(event,db,
|
||||||
person_list,family_list)
|
person_list,family_list)
|
||||||
|
|
||||||
if len(person_list) + len(family_list) > 0:
|
if len(person_list) + len(family_list) > 0:
|
||||||
msg = _('This source is currently being used. Deleting it '
|
msg = _('This source is currently being used. Deleting it '
|
||||||
|
@ -302,7 +302,7 @@ def ansel_to_utf8(s):
|
|||||||
head = s[0]
|
head = s[0]
|
||||||
s = s[1:]
|
s = s[1:]
|
||||||
buff.write(head)
|
buff.write(head)
|
||||||
ans = buff.getvalue()
|
ans = unicode(buff.getvalue())
|
||||||
buff.close()
|
buff.close()
|
||||||
return ans
|
return ans
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user