Unselect selected person on goto_active_person, apply Alexandre Duret-Lutz's
GEDCOM patches svn: r1243
This commit is contained in:
parent
7343ca181d
commit
1de1bb9790
@ -148,12 +148,9 @@ class GedcomInfoDB:
|
||||
except:
|
||||
return
|
||||
|
||||
try:
|
||||
parser = GedInfoParser(self)
|
||||
parser.parse(f)
|
||||
f.close()
|
||||
except:
|
||||
pass
|
||||
|
||||
def add_description(self,name,obj):
|
||||
self.map[name] = obj
|
||||
@ -198,6 +195,7 @@ class GedInfoParser:
|
||||
elif tag == "dest":
|
||||
self.current.set_dest(attrs['val'])
|
||||
elif tag == "adopt":
|
||||
val = attrs['val']
|
||||
if val == 'none':
|
||||
self.current.set_adopt(ADOPT_NONE)
|
||||
elif val == 'event':
|
||||
@ -212,6 +210,7 @@ class GedInfoParser:
|
||||
if attrs['val'] == 'broken':
|
||||
self.current.set_conc(CONC_BROKEN)
|
||||
elif tag == "alternate_names":
|
||||
val = attrs['val']
|
||||
if val == 'none':
|
||||
self.current.set_alt_name(ALT_NAME_NONE)
|
||||
elif val == 'event_aka':
|
||||
@ -237,5 +236,5 @@ class GedInfoParser:
|
||||
if attrs['val'] == 'place':
|
||||
self.current.set_resi(RESIDENCE_PLAC)
|
||||
elif tag == "source_refs":
|
||||
if u2l(attrs['val']) == 'no':
|
||||
if attrs['val'] == 'no':
|
||||
self.current.set_source_refs(SOURCE_REFS_NO)
|
||||
|
@ -68,6 +68,9 @@ class ListModel:
|
||||
self.double_click = event_func
|
||||
self.tree.connect('event',self.button_press)
|
||||
|
||||
def unselect(self):
|
||||
self.selection.unselect_all()
|
||||
|
||||
def set_reorderable(self,order):
|
||||
self.tree.set_reorderable(order)
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<adopt val="none"/>
|
||||
<conc val="standard"/>
|
||||
<alternate_names val="none"/>
|
||||
<prefix val="no">
|
||||
<prefix val="no"/>
|
||||
<calendar val="no"/>
|
||||
<extended_events>
|
||||
</extended_events>
|
||||
@ -18,7 +18,7 @@
|
||||
<adopt val="event"/>
|
||||
<conc val="broken"/>
|
||||
<alternate_names val="event_aka"/>
|
||||
<prefix val="no">
|
||||
<prefix val="no"/>
|
||||
<calendar val="no"/>
|
||||
<extended_events>
|
||||
</extended_events>
|
||||
@ -31,7 +31,7 @@
|
||||
<adopt val="ftw"/>
|
||||
<conc val="broken"/>
|
||||
<alternate_names val="alias"/>
|
||||
<prefix val="no">
|
||||
<prefix val="no"/>
|
||||
<calendar val="no"/>
|
||||
<extended_events>
|
||||
<event tag="_DEG" value="Degree"/>
|
||||
@ -48,7 +48,7 @@
|
||||
<adopt val="none"/>
|
||||
<conc val="broken"/>
|
||||
<alternate_names val="none"/>
|
||||
<prefix val="no">
|
||||
<prefix val="no"/>
|
||||
<calendar val="no"/>
|
||||
<extended_events>
|
||||
</extended_events>
|
||||
@ -61,7 +61,7 @@
|
||||
<adopt val="event_extended"/>
|
||||
<conc val="standard"/>
|
||||
<alternate_names val="none"/>
|
||||
<prefix val="no">
|
||||
<prefix val="no"/>
|
||||
<calendar val="yes"/>
|
||||
<extended_events>
|
||||
</extended_events>
|
||||
@ -73,7 +73,7 @@
|
||||
<dest val="Legacy"/>
|
||||
<adopt val="legacy"/>
|
||||
<conc val="broken"/>
|
||||
<prefix val="no">
|
||||
<prefix val="no"/>
|
||||
<alternate_names val="standard"/>
|
||||
<calendar val="no"/>
|
||||
<extended_events>
|
||||
@ -87,7 +87,7 @@
|
||||
<adopt val="pedigree"/>
|
||||
<conc val="standard"/>
|
||||
<alternate_names val="aka"/>
|
||||
<prefix val="no">
|
||||
<prefix val="no"/>
|
||||
<calendar val="no"/>
|
||||
<extended_events>
|
||||
</extended_events>
|
||||
@ -100,7 +100,7 @@
|
||||
<adopt val="none"/>
|
||||
<conc val="broken"/>
|
||||
<alternate_names val="none"/>
|
||||
<prefix val="no">
|
||||
<prefix val="no"/>
|
||||
<calendar val="no"/>
|
||||
<extended_events>
|
||||
</extended_events>
|
||||
@ -113,7 +113,7 @@
|
||||
<adopt val="none"/>
|
||||
<conc val="broken"/>
|
||||
<alternate_names val="_alias"/>
|
||||
<prefix val="no">
|
||||
<prefix val="no"/>
|
||||
<calendar val="no"/>
|
||||
<extended_events>
|
||||
</extended_events>
|
||||
@ -126,7 +126,7 @@
|
||||
<adopt val="none"/>
|
||||
<conc val="broken"/>
|
||||
<alternate_names val="none"/>
|
||||
<prefix val="no">
|
||||
<prefix val="no"/>
|
||||
<calendar val="no"/>
|
||||
<extended_events>
|
||||
</extended_events>
|
||||
@ -135,4 +135,3 @@
|
||||
<source_refs val="yes"/>
|
||||
</target>
|
||||
</targets>
|
||||
|
||||
|
@ -891,6 +891,7 @@ class Gramps:
|
||||
if self.id2col.has_key(id):
|
||||
(model,iter) = self.id2col[id]
|
||||
self.ptabs.set_current_page(self.model2page[model])
|
||||
model.selection.unselect_all()
|
||||
model.selection.select_iter(iter);
|
||||
itpath = model.model.get_path(iter)
|
||||
col = model.tree.get_column(0)
|
||||
|
@ -49,6 +49,7 @@ import GenericFilter
|
||||
import const
|
||||
import Utils
|
||||
import Date
|
||||
import Calendar
|
||||
from intl import gettext as _
|
||||
from latin_utf8 import latin_to_utf8
|
||||
from GedcomInfo import *
|
||||
@ -77,15 +78,15 @@ _month = [
|
||||
"JUL", "AUG", "SEP", "OCT", "NOV", "DEC" ]
|
||||
|
||||
_calmap = {
|
||||
Date.HEBREW : (_hmonth, '@#HEBREW@'),
|
||||
Date.FRENCH : (_fmonth, '@#FRENCH R@'),
|
||||
Date.JULIAN : (_month, '@#JULIAN@'),
|
||||
Calendar.Hebrew : (_hmonth, '@#HEBREW@'),
|
||||
Calendar.FrenchRepublic : (_fmonth, '@#FRENCH R@'),
|
||||
Calendar.Julian : (_month, '@#JULIAN@'),
|
||||
}
|
||||
|
||||
_caldef = {
|
||||
Date.SingleDate.about : "ABT",
|
||||
Date.SingleDate.about : "BEF",
|
||||
Date.SingleDate.about : "AFT",
|
||||
Calendar.ABOUT : "ABT",
|
||||
Calendar.BEFORE : "BEF",
|
||||
Calendar.AFTER : "AFT",
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@ -200,6 +201,12 @@ def make_date(subdate):
|
||||
mon_valid = subdate.getMonthValid()
|
||||
year_valid = subdate.getYearValid()
|
||||
|
||||
# Adjust `mon' so it can be used as index in our _Xmonth arrays.
|
||||
if mon_valid:
|
||||
mon += 1
|
||||
else:
|
||||
mon = 0
|
||||
|
||||
if _calmap.has_key(subdate.calendar):
|
||||
(mmap,prefix) = _calmap[subdate.calendar]
|
||||
else:
|
||||
@ -370,7 +377,12 @@ class GedcomWriter:
|
||||
ans.set_name(_("Ancestors of %s") % person.getPrimaryName().getName())
|
||||
ans.add_rule(GenericFilter.IsAncestorOf([person.getId()]))
|
||||
|
||||
self.filter_menu = GenericFilter.build_filter_menu([all,des,ans])
|
||||
com = GenericFilter.GenericFilter()
|
||||
com.set_name(_("People with common ancestor with %s") %
|
||||
person.getPrimaryName().getName())
|
||||
com.add_rule(GenericFilter.HasCommonAncestorWith([person.getId()]))
|
||||
|
||||
self.filter_menu = GenericFilter.build_filter_menu([all,des,ans,com])
|
||||
filter_obj.set_menu(self.filter_menu)
|
||||
|
||||
gedmap = GedcomInfoDB()
|
||||
@ -425,7 +437,7 @@ class GedcomWriter:
|
||||
for p in self.db.getPersonKeys():
|
||||
self.plist[p] = 1
|
||||
else:
|
||||
for p in cfilter.apply(self.db.getPersonMap().values()):
|
||||
for p in cfilter.apply(self.db, self.db.getPersonMap().values()):
|
||||
self.plist[p.getId()] = 1
|
||||
|
||||
self.flist = {}
|
||||
@ -537,7 +549,7 @@ class GedcomWriter:
|
||||
if self.source_refs:
|
||||
self.write_sources()
|
||||
else:
|
||||
self.sbar.set_value(100.0)
|
||||
self.sbar.set_fraction(1.0)
|
||||
|
||||
self.g.write("0 TRLR\n")
|
||||
self.g.close()
|
||||
@ -950,10 +962,6 @@ class GedcomWriter:
|
||||
if ref.getBase() == None:
|
||||
return
|
||||
|
||||
self.g.write("%d SOUR @%s@\n" % (level,self.sid(ref.getBase().getId())))
|
||||
if ref.getPage():
|
||||
self.g.write("%d PAGE %s\n" % (level+1,ref.getPage()))
|
||||
|
||||
if self.source_refs:
|
||||
self.g.write("%d SOUR @%s@\n" %
|
||||
(level,self.sid(ref.getBase().getId())))
|
||||
@ -969,9 +977,9 @@ class GedcomWriter:
|
||||
self.print_date(pfx,ref.getDate())
|
||||
else:
|
||||
# We put title, page, and date on the SOUR line.
|
||||
# Not using CONC because GeneWeb does not support this.
|
||||
# Not using CONC and CONT because GeneWeb does not support these.
|
||||
# TEXT and NOTE will be ignored by GeneWeb, but we can't
|
||||
# output paragaphs in SOUR if we don't use CONC.
|
||||
# output paragaphs in SOUR without CONT.
|
||||
sbase = ref.getBase()
|
||||
if sbase and sbase.getTitle():
|
||||
txt = sbase.getTitle() + ". "
|
||||
|
Loading…
Reference in New Issue
Block a user