Bookmark fixes, document generators handling of &, >, and <, bump up version
svn: r1216
This commit is contained in:
parent
1ec6b99059
commit
d974eee90c
4
gramps/configure
vendored
4
gramps/configure
vendored
@ -1441,7 +1441,7 @@ fi
|
||||
|
||||
# Define the identity of the package.
|
||||
PACKAGE=gramps
|
||||
VERSION=0.8.0
|
||||
VERSION=0.8.1
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
@ -1567,7 +1567,7 @@ INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
|
||||
|
||||
|
||||
|
||||
RELEASE=pl4
|
||||
RELEASE=
|
||||
|
||||
VERSIONSTRING=$VERSION
|
||||
if test x"$RELEASE" != "x"
|
||||
|
@ -1,8 +1,8 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
dnl May need to run automake && aclocal first
|
||||
AC_INIT(src/gramps.py)
|
||||
AM_INIT_AUTOMAKE(gramps, 0.8.0)
|
||||
RELEASE=pl4
|
||||
AM_INIT_AUTOMAKE(gramps, 0.8.1)
|
||||
RELEASE=
|
||||
|
||||
VERSIONSTRING=$VERSION
|
||||
if test x"$RELEASE" != "x"
|
||||
|
@ -81,6 +81,9 @@ class Bookmarks :
|
||||
self.bookmarks.append(person)
|
||||
self.redraw()
|
||||
|
||||
def getBookmarkList(self):
|
||||
return self.bookmarks
|
||||
|
||||
def add_to_menu(self,person):
|
||||
"""adds a person's name to the drop down menu"""
|
||||
item = gtk.GtkMenuItem(person.getPrimaryName().getName())
|
||||
|
@ -1964,6 +1964,10 @@ class GrampsDB(Persistent):
|
||||
"""returns the list of Person instances in the bookmarks"""
|
||||
return extlist(self.bookmarks)
|
||||
|
||||
def setBookmarks(self,list):
|
||||
"""returns the list of Person instances in the bookmarks"""
|
||||
self.bookmarks = list
|
||||
|
||||
def clean_bookmarks(self):
|
||||
"""cleans up the bookmark list, removing empty slots"""
|
||||
new_bookmarks = []
|
||||
|
@ -96,7 +96,7 @@ class SubstKeywords:
|
||||
for e in f.getEventList():
|
||||
if e.getName == 'Marriage':
|
||||
self.m = e.getDate()
|
||||
self.M = e.getPlace()
|
||||
self.M = e.getPlaceName()
|
||||
else:
|
||||
self.s = ""
|
||||
self.S = ""
|
||||
|
@ -524,9 +524,12 @@ class HtmlDoc(TextDoc):
|
||||
self.f.write('</p>\n')
|
||||
|
||||
def write_text(self,text):
|
||||
text = string.replace(text,'&','&'); # Must be first
|
||||
text = string.replace(text,'<','<');
|
||||
text = string.replace(text,'>','>');
|
||||
text = string.replace(text,'\n','<br>')
|
||||
if text != "":
|
||||
self.empty = 0
|
||||
#text = string.replace(text,'\n','<br>')
|
||||
self.f.write(text)
|
||||
|
||||
def start_bold(self):
|
||||
|
@ -426,6 +426,9 @@ class KwordDoc(TextDoc):
|
||||
pass
|
||||
|
||||
def write_text(self,text):
|
||||
text = string.replace(text,'&','&'); # Must be first
|
||||
text = string.replace(text,'<','<');
|
||||
text = string.replace(text,'>','>');
|
||||
self.text = self.text + text
|
||||
|
||||
|
||||
|
@ -490,6 +490,9 @@ class OpenOfficeDoc(TextDoc):
|
||||
self.f.write('</text:h>\n')
|
||||
|
||||
def write_text(self,text):
|
||||
text = string.replace(text,'&','&'); # Must be first
|
||||
text = string.replace(text,'<','<');
|
||||
text = string.replace(text,'>','>');
|
||||
text = string.replace(text,'\n','<text:line-break/>')
|
||||
self.f.write(latin_to_utf8(text))
|
||||
|
||||
|
@ -78,6 +78,8 @@ class PSDrawDoc(DrawDoc):
|
||||
self.f.write('%%LanguageLevel: 2\n')
|
||||
self.f.write('%%Pages: (atend)\n')
|
||||
self.f.write('%%PageOrder: Ascend\n')
|
||||
if self.orientation != PAPER_PORTRAIT:
|
||||
self.f.write('%%Orientation: Landscape\n')
|
||||
self.f.write('%%EndComments\n')
|
||||
self.f.write('/cm { 28.34 mul } def\n')
|
||||
|
||||
@ -101,6 +103,8 @@ class PSDrawDoc(DrawDoc):
|
||||
self.page = self.page + 1
|
||||
self.f.write("%%Page:")
|
||||
self.f.write("%d %d\n" % (self.page,self.page))
|
||||
if self.orientation != PAPER_PORTRAIT:
|
||||
self.f.write('90 rotate %5.2f cm %5.2f cm translate\n' % (0,-1*self.height))
|
||||
|
||||
def end_page(self):
|
||||
self.f.write('showpage\n')
|
||||
|
@ -794,7 +794,8 @@ class Gramps:
|
||||
autosave = "%s/autosave.gramps" % filename
|
||||
|
||||
self.statusbar.set_status(_("Saving %s ...") % filename)
|
||||
|
||||
if self.bookmarks:
|
||||
self.db.setBookmarks(self.bookmarks.getBookmarkList())
|
||||
Utils.clearModified()
|
||||
Utils.clear_timer()
|
||||
|
||||
@ -852,7 +853,8 @@ class Gramps:
|
||||
Utils.clear_timer()
|
||||
|
||||
filename = "%s/autosave.gramps" % (self.db.getSavePath())
|
||||
|
||||
if self.bookmarks:
|
||||
self.db.setBookmarks(self.bookmarks.getBookmarkList())
|
||||
self.statusbar.set_status(_("autosaving..."));
|
||||
try:
|
||||
self.db.save(filename,self.quick_progress)
|
||||
@ -933,13 +935,10 @@ class Gramps:
|
||||
for key in self.db.getFamilyMap().keys():
|
||||
family = self.db.getFamily(key)
|
||||
if self.active_person == family.getFather():
|
||||
print "removing father"
|
||||
family.setFather(None)
|
||||
if self.active_person == family.getMother():
|
||||
print "removing mother"
|
||||
family.setMother(None)
|
||||
if self.active_person in family.getChildList():
|
||||
print "removing child"
|
||||
family.removeChild(self.active_person)
|
||||
|
||||
self.db.removePerson(self.active_person.getId())
|
||||
|
@ -361,6 +361,13 @@ class GedcomWriter:
|
||||
|
||||
target_obj.set_menu(myMenu)
|
||||
self.target_menu = myMenu
|
||||
|
||||
dpath = os.path.dirname(db.getSavePath())
|
||||
pathname = "%s.ged" % dpath
|
||||
|
||||
self.topDialog.get_widget('fileentry1').set_default_path(dpath)
|
||||
filetgt = self.topDialog.get_widget('filename')
|
||||
filetgt.set_text(pathname)
|
||||
|
||||
self.topDialog.get_widget("gedcomExport").show()
|
||||
|
||||
@ -613,6 +620,11 @@ class GedcomWriter:
|
||||
elif person.getGender() == Person.female:
|
||||
self.g.write("1 SEX F\n")
|
||||
|
||||
ad = 0
|
||||
if (self.adopt == ADOPT_STD or self.adopt == ADOPT_EVENT):
|
||||
ad = 1
|
||||
self.write_adopt_event(person)
|
||||
|
||||
if not self.restrict or not person.probablyAlive():
|
||||
|
||||
birth = person.getBirth()
|
||||
@ -631,8 +643,6 @@ class GedcomWriter:
|
||||
if uid != "":
|
||||
self.g.write("1 _UID %s\n" % uid)
|
||||
|
||||
ad = 0
|
||||
|
||||
self.write_ord("BAPL",person.getLdsBaptism(),1,const.lds_baptism)
|
||||
self.write_ord("ENDL",person.getLdsEndowment(),1,const.lds_baptism)
|
||||
self.write_ord("SLGC",person.getLdsSeal(),1,const.lds_csealing)
|
||||
@ -646,26 +656,11 @@ class GedcomWriter:
|
||||
val = const.personalConstantEvents[name]
|
||||
if val == "":
|
||||
val = self.target_ged.gramps2tag(name)
|
||||
|
||||
if self.adopt == ADOPT_EVENT and val == "ADOP":
|
||||
ad = 1
|
||||
self.g.write('1 ADOP\n')
|
||||
fam = None
|
||||
for f in person.getParentList():
|
||||
mrel = string.lower(f[1])
|
||||
frel = string.lower(f[2])
|
||||
if mrel=="adopted" or frel=="adopted":
|
||||
fam = f[0]
|
||||
break
|
||||
if fam:
|
||||
self.g.write('2 FAMC @%s@\n' % self.fid(fam.getId()))
|
||||
if mrel == frel:
|
||||
self.g.write('3 ADOP BOTH\n')
|
||||
elif mrel == "adopted":
|
||||
self.g.write('3 ADOP WIFE\n')
|
||||
else:
|
||||
self.g.write('3 ADOP HUSB\n')
|
||||
elif val != "" :
|
||||
|
||||
if val == "ADOP" and ad == 1:
|
||||
continue
|
||||
|
||||
if val != "" :
|
||||
self.g.write("1 %s %s\n" % (self.cnvtxt(val),\
|
||||
self.cnvtxt(event.getDescription())))
|
||||
else:
|
||||
@ -674,24 +669,6 @@ class GedcomWriter:
|
||||
|
||||
self.dump_event_stats(event)
|
||||
|
||||
if self.adopt == ADOPT_EVENT and ad == 0 and len(person.getParentList()) > 1:
|
||||
self.g.write('1 ADOP\n')
|
||||
fam = None
|
||||
for f in person.getParentList():
|
||||
mrel = string.lower(f[1])
|
||||
frel = string.lower(f[2])
|
||||
if mrel=="adopted" or frel=="adopted":
|
||||
fam = f[0]
|
||||
break
|
||||
if fam:
|
||||
self.g.write('2 FAMC @%s@\n' % self.fid(fam.getId()))
|
||||
if mrel == frel:
|
||||
self.g.write('3 ADOP BOTH\n')
|
||||
elif mrel == "adopted":
|
||||
self.g.write('3 ADOP WIFE\n')
|
||||
else:
|
||||
self.g.write('3 ADOP HUSB\n')
|
||||
|
||||
for attr in person.getAttributeList():
|
||||
if self.private and attr.getPrivacy():
|
||||
continue
|
||||
@ -742,7 +719,7 @@ class GedcomWriter:
|
||||
for family in person.getParentList():
|
||||
if self.flist.has_key(family[0].getId()):
|
||||
self.g.write("1 FAMC @%s@\n" % self.fid(family[0].getId()))
|
||||
if self.adopt == ADOPT_PEDI:
|
||||
if self.adopt == ADOPT_PEDI or self.adopt == ADOPT_STD:
|
||||
if string.lower(family[1]) == "adopted":
|
||||
self.g.write("2 PEDI Adopted\n")
|
||||
|
||||
@ -762,6 +739,24 @@ class GedcomWriter:
|
||||
if person.getNote() != "":
|
||||
self.write_long_text("NOTE",1,self.cnvtxt(person.getNote()))
|
||||
|
||||
def write_adopt_event(self,person):
|
||||
fam = None
|
||||
for f in person.getParentList():
|
||||
mrel = string.lower(f[1])
|
||||
frel = string.lower(f[2])
|
||||
if mrel=="adopted" or frel=="adopted":
|
||||
fam = f[0]
|
||||
break
|
||||
if fam:
|
||||
self.g.write('1 ADOP\n')
|
||||
self.g.write('2 FAMC @%s@\n' % self.fid(fam.getId()))
|
||||
if mrel == frel:
|
||||
self.g.write('3 ADOP BOTH\n')
|
||||
elif mrel == "adopted":
|
||||
self.g.write('3 ADOP WIFE\n')
|
||||
else:
|
||||
self.g.write('3 ADOP HUSB\n')
|
||||
|
||||
def write_long_text(self,tag,level,note):
|
||||
if self.conc == CONC_OK:
|
||||
self.write_conc_ok(tag,level,note)
|
||||
|
10268
gramps/src/po/es.po
10268
gramps/src/po/es.po
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user