Merge fixes, option to display relationship to the home person in the
status bar. svn: r1380
This commit is contained in:
parent
b459ebf1d4
commit
97068b77a6
@ -2,11 +2,11 @@
|
|||||||
<!DOCTYPE database SYSTEM "gramps.dtd" []>
|
<!DOCTYPE database SYSTEM "gramps.dtd" []>
|
||||||
<database>
|
<database>
|
||||||
<header>
|
<header>
|
||||||
<created date="23 FEB 2003" version="0.9.0-rc5" people="42" families="15" sources="4" places="24"/>
|
<created date="21 MAR 2003" version="0.9.0-1" people="42" families="15" sources="4" places="24"/>
|
||||||
<researcher>
|
<researcher>
|
||||||
<resname>Joe Smith</resname>
|
<resname>Joe Smith</resname>
|
||||||
<resaddr>Over There</resaddr>
|
<resaddr>Over There</resaddr>
|
||||||
<rescity>Springfield</rescity>
|
<rescity>Somewhere</rescity>
|
||||||
<resstate>New York</resstate>
|
<resstate>New York</resstate>
|
||||||
<rescountry>USA</rescountry>
|
<rescountry>USA</rescountry>
|
||||||
<respostal>12345</respostal>
|
<respostal>12345</respostal>
|
||||||
@ -311,18 +311,6 @@
|
|||||||
</event>
|
</event>
|
||||||
<parentin ref="F1"/>
|
<parentin ref="F1"/>
|
||||||
</person>
|
</person>
|
||||||
<person id="I35">
|
|
||||||
<gender>M</gender>
|
|
||||||
<name type="Birth Name">
|
|
||||||
<first>Lars Peter</first>
|
|
||||||
<last>Smith</last>
|
|
||||||
</name>
|
|
||||||
<event type="Birth">
|
|
||||||
<dateval val="1991-09-16"/>
|
|
||||||
<place ref="P21"/>
|
|
||||||
</event>
|
|
||||||
<childof ref="F10" mrel="Adopted" frel="Adopted"/>
|
|
||||||
</person>
|
|
||||||
<person id="I34">
|
<person id="I34">
|
||||||
<gender>F</gender>
|
<gender>F</gender>
|
||||||
<name type="Birth Name">
|
<name type="Birth Name">
|
||||||
@ -556,6 +544,18 @@ Company. He enlisted in the army at Sparks 7 December 1917 and served as a Corpo
|
|||||||
<childof ref="F9"/>
|
<childof ref="F9"/>
|
||||||
<parentin ref="F8"/>
|
<parentin ref="F8"/>
|
||||||
</person>
|
</person>
|
||||||
|
<person id="I32">
|
||||||
|
<gender>F</gender>
|
||||||
|
<name type="Birth Name">
|
||||||
|
<first>Darcy</first>
|
||||||
|
<last>Horne</last>
|
||||||
|
</name>
|
||||||
|
<event type="Birth">
|
||||||
|
<dateval val="1966-07-02"/>
|
||||||
|
<place ref="P20"/>
|
||||||
|
</event>
|
||||||
|
<parentin ref="F10"/>
|
||||||
|
</person>
|
||||||
<person id="I25">
|
<person id="I25">
|
||||||
<gender>F</gender>
|
<gender>F</gender>
|
||||||
<name type="Birth Name">
|
<name type="Birth Name">
|
||||||
@ -597,17 +597,17 @@ Company. He enlisted in the army at Sparks 7 December 1917 and served as a Corpo
|
|||||||
<childof ref="F12"/>
|
<childof ref="F12"/>
|
||||||
<parentin ref="F13"/>
|
<parentin ref="F13"/>
|
||||||
</person>
|
</person>
|
||||||
<person id="I32">
|
<person id="I35">
|
||||||
<gender>F</gender>
|
<gender>M</gender>
|
||||||
<name type="Birth Name">
|
<name type="Birth Name">
|
||||||
<first>Darcy</first>
|
<first>Lars Peter</first>
|
||||||
<last>Horne</last>
|
<last>Smith</last>
|
||||||
</name>
|
</name>
|
||||||
<event type="Birth">
|
<event type="Birth">
|
||||||
<dateval val="1966-07-02"/>
|
<dateval val="1991-09-16"/>
|
||||||
<place ref="P20"/>
|
<place ref="P21"/>
|
||||||
</event>
|
</event>
|
||||||
<parentin ref="F10"/>
|
<childof ref="F10" mrel="Adopted" frel="Adopted"/>
|
||||||
</person>
|
</person>
|
||||||
<person id="I21">
|
<person id="I21">
|
||||||
<gender>M</gender>
|
<gender>M</gender>
|
||||||
@ -846,15 +846,15 @@ Martin was listed as being a Husman, (owning a house as opposed to a farm) in th
|
|||||||
<placeobj id="P24" title="UC Berkeley"/>
|
<placeobj id="P24" title="UC Berkeley"/>
|
||||||
<placeobj id="P12" title="Grostorp, Kristianstad Lan, Sweden"/>
|
<placeobj id="P12" title="Grostorp, Kristianstad Lan, Sweden"/>
|
||||||
<placeobj id="P13" title="Copenhagen, Denmark"/>
|
<placeobj id="P13" title="Copenhagen, Denmark"/>
|
||||||
<placeobj id="P21" title="Santa Rosa, Sonoma Co., CA"/>
|
<placeobj id="P14" title="Hoya/Jona/Hoia, Sweden"/>
|
||||||
<placeobj id="P15" title="Simrishamn, Kristianstad Lan, Sweden"/>
|
<placeobj id="P20" title="Sacramento, Sacramento Co., CA"/>
|
||||||
<placeobj id="P16" title="Fremont, Alameda Co., CA"/>
|
<placeobj id="P16" title="Fremont, Alameda Co., CA"/>
|
||||||
<placeobj id="P22" title="San Jose, Santa Clara Co., CA"/>
|
<placeobj id="P22" title="San Jose, Santa Clara Co., CA"/>
|
||||||
<placeobj id="P14" title="Hoya/Jona/Hoia, Sweden"/>
|
<placeobj id="P21" title="Santa Rosa, Sonoma Co., CA"/>
|
||||||
<placeobj id="P30" title="San Ramon, Conta Costa Co., CA"/>
|
<placeobj id="P30" title="San Ramon, Conta Costa Co., CA"/>
|
||||||
<placeobj id="P29" title="Woodland, Yolo Co., CA"/>
|
<placeobj id="P29" title="Woodland, Yolo Co., CA"/>
|
||||||
<placeobj id="P28" title="Ronne Bornholm, Denmark"/>
|
<placeobj id="P28" title="Ronne Bornholm, Denmark"/>
|
||||||
<placeobj id="P20" title="Sacramento, Sacramento Co., CA"/>
|
<placeobj id="P15" title="Simrishamn, Kristianstad Lan, Sweden"/>
|
||||||
</places>
|
</places>
|
||||||
<objects>
|
<objects>
|
||||||
<object id="O5" src="O5.jpg" mime="image/jpeg" description="Edwin & Janice Smith"/>
|
<object id="O5" src="O5.jpg" mime="image/jpeg" description="Edwin & Janice Smith"/>
|
||||||
@ -864,4 +864,10 @@ Martin was listed as being a Husman, (owning a house as opposed to a farm) in th
|
|||||||
<object id="O1" src="O1.jpg" mime="image/jpeg" description="Arriving 1910"/>
|
<object id="O1" src="O1.jpg" mime="image/jpeg" description="Arriving 1910"/>
|
||||||
<object id="O0" src="O0.jpg" mime="image/jpeg" description="Keith Lloyd Smith"/>
|
<object id="O0" src="O0.jpg" mime="image/jpeg" description="Keith Lloyd Smith"/>
|
||||||
</objects>
|
</objects>
|
||||||
|
<bookmarks>
|
||||||
|
<bookmark ref="I10"/>
|
||||||
|
<bookmark ref="I13"/>
|
||||||
|
<bookmark ref="I41"/>
|
||||||
|
<bookmark ref="I6"/>
|
||||||
|
</bookmarks>
|
||||||
</database>
|
</database>
|
||||||
|
@ -92,7 +92,7 @@ class AttributeEditor:
|
|||||||
l = self.top.get_widget("title")
|
l = self.top.get_widget("title")
|
||||||
Utils.set_titles(self.window,l,title,_('Attribute Editor'))
|
Utils.set_titles(self.window,l,title,_('Attribute Editor'))
|
||||||
|
|
||||||
AutoComp.AutoEntry(self.attrib_menu.entry,list)
|
AutoComp.AutoCombo(self.attrib_menu,list)
|
||||||
|
|
||||||
if attrib != None:
|
if attrib != None:
|
||||||
self.type_field.set_text(attrib.getType())
|
self.type_field.set_text(attrib.getType())
|
||||||
|
@ -134,14 +134,14 @@ class AutoCombo(AutoCompBase):
|
|||||||
AutoCompBase.__init__(self,widget,plist,source)
|
AutoCompBase.__init__(self,widget,plist,source)
|
||||||
self.entry = widget
|
self.entry = widget
|
||||||
widget.entry.connect("insert-text",self.insert_text)
|
widget.entry.connect("insert-text",self.insert_text)
|
||||||
button1 = widget.get_children()[1]
|
# button1 = widget.get_children()[1]
|
||||||
button1.connect("button-press-event",self.build_list)
|
# button1.connect("pressed",self.build_list)
|
||||||
button1.connect("button-release-event",self.setval)
|
# button1.connect("released",self.setval)
|
||||||
self.vals = [""]
|
self.vals = [""]
|
||||||
self.inb = 0
|
self.inb = 0
|
||||||
widget.set_popdown_strings(plist)
|
widget.set_popdown_strings(plist)
|
||||||
|
|
||||||
def setval(self,widget,event):
|
def setval(self,widget):
|
||||||
"""Callback task called on the button release"""
|
"""Callback task called on the button release"""
|
||||||
|
|
||||||
self.inb = 0
|
self.inb = 0
|
||||||
@ -150,15 +150,18 @@ class AutoCombo(AutoCompBase):
|
|||||||
gtk.Editable.set_position(self.entry.entry,self.l)
|
gtk.Editable.set_position(self.entry.entry,self.l)
|
||||||
gtk.Editable.select_region(self.entry.entry,self.l,-1)
|
gtk.Editable.select_region(self.entry.entry,self.l,-1)
|
||||||
|
|
||||||
def build_list(self,widget,event):
|
def build_list(self,widget):
|
||||||
"""Internal task that builds the popdown strings. This task is called when the
|
"""Internal task that builds the popdown strings. This task is called when the
|
||||||
combo button that activates the dropdown menu is pressed
|
combo button that activates the dropdown menu is pressed
|
||||||
"""
|
"""
|
||||||
self.inb = 1
|
self.inb = 1
|
||||||
|
|
||||||
|
print text
|
||||||
if self.vals[0] == "":
|
if self.vals[0] == "":
|
||||||
self.entry.set_popdown_strings([self.entry.entry.get_text()])
|
self.entry.set_popdown_strings([self.entry.entry.get_text()])
|
||||||
else:
|
else:
|
||||||
self.entry.set_popdown_strings(self.vals)
|
self.entry.set_popdown_strings(self.vals)
|
||||||
|
return 1
|
||||||
|
|
||||||
def timer_callback(self,entry):
|
def timer_callback(self,entry):
|
||||||
"""
|
"""
|
||||||
|
@ -89,10 +89,12 @@ class Bookmarks :
|
|||||||
"""Draws the bookmark dialog box"""
|
"""Draws the bookmark dialog box"""
|
||||||
title = "%s - GRAMPS" % _("Edit Bookmarks")
|
title = "%s - GRAMPS" % _("Edit Bookmarks")
|
||||||
self.top = gtk.Dialog(title)
|
self.top = gtk.Dialog(title)
|
||||||
self.top.set_default_size(350,250)
|
self.top.set_default_size(400,350)
|
||||||
|
self.top.set_has_separator(gtk.FALSE)
|
||||||
self.top.vbox.set_spacing(5)
|
self.top.vbox.set_spacing(5)
|
||||||
self.top.vbox.pack_start(gtk.Label(_("Edit Bookmarks")),0,0,5)
|
label = gtk.Label('<span size="larger" weight="bold">%s</span>' % _("Edit Bookmarks"))
|
||||||
self.top.vbox.pack_start(gtk.HSeparator(),0,0,5)
|
label.set_use_markup(gtk.TRUE)
|
||||||
|
self.top.vbox.pack_start(label,0,0,5)
|
||||||
box = gtk.HBox()
|
box = gtk.HBox()
|
||||||
self.top.vbox.pack_start(box,1,1,5)
|
self.top.vbox.pack_start(box,1,1,5)
|
||||||
self.namelist = gtk.CList(1)
|
self.namelist = gtk.CList(1)
|
||||||
@ -102,6 +104,7 @@ class Bookmarks :
|
|||||||
box.pack_start(slist,1,1,5)
|
box.pack_start(slist,1,1,5)
|
||||||
bbox = gtk.VButtonBox()
|
bbox = gtk.VButtonBox()
|
||||||
bbox.set_layout(gtk.BUTTONBOX_START)
|
bbox.set_layout(gtk.BUTTONBOX_START)
|
||||||
|
bbox.set_spacing(6)
|
||||||
up = gtk.Button()
|
up = gtk.Button()
|
||||||
up.set_label(gtk.STOCK_GO_UP)
|
up.set_label(gtk.STOCK_GO_UP)
|
||||||
up.set_use_stock(1)
|
up.set_use_stock(1)
|
||||||
|
@ -583,11 +583,13 @@ class GrampsPreferences:
|
|||||||
self.top.get_widget("fprefix").set_text(fprefix)
|
self.top.get_widget("fprefix").set_text(fprefix)
|
||||||
self.top.get_widget("sprefix").set_text(sprefix)
|
self.top.get_widget("sprefix").set_text(sprefix)
|
||||||
self.top.get_widget("pprefix").set_text(pprefix)
|
self.top.get_widget("pprefix").set_text(pprefix)
|
||||||
|
|
||||||
if status_bar == 0:
|
if status_bar == 0:
|
||||||
self.top.get_widget("stat1").set_active(1)
|
self.top.get_widget("stat1").set_active(1)
|
||||||
else:
|
elif status_bar == 1:
|
||||||
self.top.get_widget("stat2").set_active(1)
|
self.top.get_widget("stat2").set_active(1)
|
||||||
|
else:
|
||||||
|
self.top.get_widget("stat3").set_active(1)
|
||||||
|
|
||||||
if toolbar == 0:
|
if toolbar == 0:
|
||||||
self.top.get_widget("tool1").set_active(1)
|
self.top.get_widget("tool1").set_active(1)
|
||||||
|
@ -72,6 +72,7 @@ pkgpython_PYTHON = \
|
|||||||
QuestionDialog.py\
|
QuestionDialog.py\
|
||||||
QuickAdd.py\
|
QuickAdd.py\
|
||||||
ReadXML.py\
|
ReadXML.py\
|
||||||
|
Relationship.py\
|
||||||
RelImage.py\
|
RelImage.py\
|
||||||
RelLib.py\
|
RelLib.py\
|
||||||
Report.py\
|
Report.py\
|
||||||
|
249
src/Relationship.py
Normal file
249
src/Relationship.py
Normal file
@ -0,0 +1,249 @@
|
|||||||
|
#
|
||||||
|
# Gramps - a GTK+/GNOME based genealogy program
|
||||||
|
#
|
||||||
|
# Copyright (C) 2000 Donald N. Allingham
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# GRAMPS modules
|
||||||
|
#
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
import RelLib
|
||||||
|
import GrampsCfg
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
level_name = [ "", "First", "Second", "Third", "Fourth", "Fifth", "Sixth",
|
||||||
|
"Seventh", "Eighth", "Ninth", "Tenth", "Eleventh", "Twelfth",
|
||||||
|
"Thirteenth", "Fourteenth", "Fifteenth", "Sixteenth",
|
||||||
|
"Seventeenth", "Eigthteenth", "Nineteenth", "Twentieth" ]
|
||||||
|
|
||||||
|
removed_level = [ "", " once removed", " twice removed", " three times removed",
|
||||||
|
" four times removed", " five times removed", " six times removed",
|
||||||
|
" sevent times removed", " eight times removed", " nine times removed",
|
||||||
|
" ten times removed", " eleven times removed", " twelve times removed",
|
||||||
|
" thirteen times removed", " fourteen times removed", " fifteen times removed",
|
||||||
|
" sixteen times removed", " seventeen times removed", " eighteen times removed",
|
||||||
|
" nineteen times removed", " twenty times removed" ]
|
||||||
|
|
||||||
|
father_level = [ "", "Father", "Grandfather", "Great Grandfather", "Second Great Grandfather",
|
||||||
|
"Third Great Grandfather", "Fourth Great Grandfather",
|
||||||
|
"Fifth Great Grandfather", "Sixth Great Grandfather",
|
||||||
|
"Seventh Great Grandfather", "Eighth Great Grandfather",
|
||||||
|
"Ninth Great Grandfather", "Tenth Great Grandfather",
|
||||||
|
"Eleventh Great Grandfather", "Twelefth Great Grandfather",
|
||||||
|
"Thirteenth Great Grandfather", "Fourteenth Great Grandfather",
|
||||||
|
"Fifteenth Great Grandfather", "Sixteenth Great Grandfather",
|
||||||
|
"Seventeenth Great Grandfather", "Eightteenth Great Grandfather",
|
||||||
|
"Ninetheen Great Grandfather", "Twentieth Great Grandfather", ]
|
||||||
|
|
||||||
|
mother_level = [ "", "Mother", "Grandmother", "Great Grandmother", "Second Great Grandmother",
|
||||||
|
"Third Great Grandmother", "Fourth Great Grandmother",
|
||||||
|
"Fifth Great Grandmother", "Sixth Great Grandmother",
|
||||||
|
"Seventh Great Grandmother", "Eighth Great Grandmother",
|
||||||
|
"Ninth Great Grandmother", "Tenth Great Grandmother",
|
||||||
|
"Eleventh Great Grandmother", "Twelefth Great Grandmother",
|
||||||
|
"Thirteenth Great Grandmother", "Fourteenth Great Grandmother",
|
||||||
|
"Fifteenth Great Grandmother", "Sixteenth Great Grandmother",
|
||||||
|
"Seventeenth Great Grandmother", "Eightteenth Great Grandmother",
|
||||||
|
"Ninetheen Great Grandmother", "Twentieth Great Grandmother", ]
|
||||||
|
|
||||||
|
son_level = [ "", "Son", "Grandson", "Great Grandson", "Second Great Grandson",
|
||||||
|
"Third Great Grandson", "Fourth Great Grandson",
|
||||||
|
"Fifth Great Grandson", "Sixth Great Grandson",
|
||||||
|
"Seventh Great Grandson", "Eighth Great Grandson",
|
||||||
|
"Ninth Great Grandson", "Tenth Great Grandson",
|
||||||
|
"Eleventh Great Grandson", "Twelefth Great Grandson",
|
||||||
|
"Thirteenth Great Grandson", "Fourteenth Great Grandson",
|
||||||
|
"Fifteenth Great Grandson", "Sixteenth Great Grandson",
|
||||||
|
"Seventeenth Great Grandson", "Eightteenth Great Grandson",
|
||||||
|
"Ninetheen Great Grandson", "Twentieth Great Grandson", ]
|
||||||
|
|
||||||
|
daughter_level = [ "", "Daughter", "Granddaughter", "Great Granddaughter", "Second Great Granddaughter",
|
||||||
|
"Third Great Granddaughter", "Fourth Great Granddaughter",
|
||||||
|
"Fifth Great Granddaughter", "Sixth Great Granddaughter",
|
||||||
|
"Seventh Great Granddaughter", "Eighth Great Granddaughter",
|
||||||
|
"Ninth Great Granddaughter", "Tenth Great Granddaughter",
|
||||||
|
"Eleventh Great Granddaughter", "Twelefth Great Granddaughter",
|
||||||
|
"Thirteenth Great Granddaughter", "Fourteenth Great Granddaughter",
|
||||||
|
"Fifteenth Great Granddaughter", "Sixteenth Great Granddaughter",
|
||||||
|
"Seventeenth Great Granddaughter", "Eightteenth Great Granddaughter",
|
||||||
|
"Ninetheen Great Granddaughter", "Twentieth Great Granddaughter", ]
|
||||||
|
|
||||||
|
sister_level = [ "", "Sister", "Aunt", "Grandaunt", "Great Grandaunt", "Second Great Grandaunt",
|
||||||
|
"Third Great Grandaunt", "Fourth Great Grandaunt",
|
||||||
|
"Fifth Great Grandaunt", "Sixth Great Grandaunt",
|
||||||
|
"Seventh Great Grandaunt", "Eighth Great Grandaunt",
|
||||||
|
"Ninth Great Grandaunt", "Tenth Great Grandaunt",
|
||||||
|
"Eleventh Great Grandaunt", "Twelefth Great Grandaunt",
|
||||||
|
"Thirteenth Great Grandaunt", "Fourteenth Great Grandaunt",
|
||||||
|
"Fifteenth Great Grandaunt", "Sixteenth Great Grandaunt",
|
||||||
|
"Seventeenth Great Grandaunt", "Eightteenth Great Grandaunt",
|
||||||
|
"Ninetheen Great Grandaunt", "Twentieth Great Grandaunt", ]
|
||||||
|
|
||||||
|
brother_level = [ "", "Brother", "Uncle", "Granduncle", "Great Granduncle", "Second Great Granduncle",
|
||||||
|
"Third Great Granduncle", "Fourth Great Granduncle",
|
||||||
|
"Fifth Great Granduncle", "Sixth Great Granduncle",
|
||||||
|
"Seventh Great Granduncle", "Eighth Great Granduncle",
|
||||||
|
"Ninth Great Granduncle", "Tenth Great Granduncle",
|
||||||
|
"Eleventh Great Granduncle", "Twelefth Great Granduncle",
|
||||||
|
"Thirteenth Great Granduncle", "Fourteenth Great Granduncle",
|
||||||
|
"Fifteenth Great Granduncle", "Sixteenth Great Granduncle",
|
||||||
|
"Seventeenth Great Granduncle", "Eightteenth Great Granduncle",
|
||||||
|
"Ninetheen Great Granduncle", "Twentieth Great Granduncle", ]
|
||||||
|
|
||||||
|
nephew_level = [ "", "Nephew", "Grandnephew", "Great Grandnephew", "Second Great Grandnephew",
|
||||||
|
"Third Great Grandnephew", "Fourth Great Grandnephew",
|
||||||
|
"Fifth Great Grandnephew", "Sixth Great Grandnephew",
|
||||||
|
"Seventh Great Grandnephew", "Eighth Great Grandnephew",
|
||||||
|
"Ninth Great Grandnephew", "Tenth Great Grandnephew",
|
||||||
|
"Eleventh Great Grandnephew", "Twelefth Great Grandnephew",
|
||||||
|
"Thirteenth Great Grandnephew", "Fourteenth Great Grandnephew",
|
||||||
|
"Fifteenth Great Grandnephew", "Sixteenth Great Grandnephew",
|
||||||
|
"Seventeenth Great Grandnephew", "Eightteenth Great Grandnephew",
|
||||||
|
"Ninetheen Great Grandnephew", "Twentieth Great Grandnephew", ]
|
||||||
|
niece_level = [ "", "Niece", "Grandniece", "Great Grandniece", "Second Great Grandniece",
|
||||||
|
"Third Great Grandniece", "Fourth Great Grandniece",
|
||||||
|
"Fifth Great Grandniece", "Sixth Great Grandniece",
|
||||||
|
"Seventh Great Grandniece", "Eighth Great Grandniece",
|
||||||
|
"Ninth Great Grandniece", "Tenth Great Grandniece",
|
||||||
|
"Eleventh Great Grandniece", "Twelefth Great Grandniece",
|
||||||
|
"Thirteenth Great Grandniece", "Fourteenth Great Grandniece",
|
||||||
|
"Fifteenth Great Grandniece", "Sixteenth Great Grandniece",
|
||||||
|
"Seventeenth Great Grandniece", "Eightteenth Great Grandniece",
|
||||||
|
"Ninetheen Great Grandniece", "Twentieth Great Grandniece", ]
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
def filter(person,index,list,map):
|
||||||
|
if person == None:
|
||||||
|
return
|
||||||
|
list.append(person)
|
||||||
|
map[person.getId()] = index
|
||||||
|
|
||||||
|
family = person.getMainParents()
|
||||||
|
if family != None:
|
||||||
|
filter(family.getFather(),index+1,list,map)
|
||||||
|
filter(family.getMother(),index+1,list,map)
|
||||||
|
|
||||||
|
def get_cousin(f,s,level,removed):
|
||||||
|
return "%s cousin%s of %s" % (level_name[level],removed_level[removed],f)
|
||||||
|
|
||||||
|
def get_father(f,s,level):
|
||||||
|
return "%s of %s" % (father_level[level],f)
|
||||||
|
|
||||||
|
def get_son(f,s,level):
|
||||||
|
return "%s of %s" % (son_level[level],f)
|
||||||
|
|
||||||
|
def get_mother(f,s,level):
|
||||||
|
return "%s of %s" % (mother_level[level],f)
|
||||||
|
|
||||||
|
def get_daughter(f,s,level):
|
||||||
|
return "%s of %s" % (daughter_level[level],f)
|
||||||
|
|
||||||
|
def get_aunt(f,s,level):
|
||||||
|
return "%s of %s" % (sister_level[level],f)
|
||||||
|
|
||||||
|
def get_uncle(f,s,level):
|
||||||
|
return "%s of %s" % (brother_level[level],f)
|
||||||
|
|
||||||
|
def get_nephew(f,s,level):
|
||||||
|
return "%s of %s" % (nephew_level[level],f)
|
||||||
|
|
||||||
|
def get_niece(f,s,level):
|
||||||
|
return "%s of %s" % (niece_level[level],f)
|
||||||
|
|
||||||
|
def get_relationship(orig_person,other_person):
|
||||||
|
firstMap = {}
|
||||||
|
firstList = []
|
||||||
|
secondMap = {}
|
||||||
|
secondList = []
|
||||||
|
common = []
|
||||||
|
rank = 9999999
|
||||||
|
|
||||||
|
filter(orig_person,0,firstList,firstMap)
|
||||||
|
filter(other_person,0,secondList,secondMap)
|
||||||
|
|
||||||
|
for person in firstList:
|
||||||
|
if person in secondList:
|
||||||
|
new_rank = firstMap[person.getId()]
|
||||||
|
if new_rank < rank:
|
||||||
|
rank = new_rank
|
||||||
|
common = [ person ]
|
||||||
|
elif new_rank == rank:
|
||||||
|
common.append(person)
|
||||||
|
|
||||||
|
firstRel = -1
|
||||||
|
secondRel = -1
|
||||||
|
|
||||||
|
firstName = orig_person.getPrimaryName().getRegularName()
|
||||||
|
secondName = other_person.getPrimaryName().getRegularName()
|
||||||
|
|
||||||
|
length = len(common)
|
||||||
|
|
||||||
|
if length == 1:
|
||||||
|
person = common[0]
|
||||||
|
secondRel = firstMap[person.getId()]
|
||||||
|
firstRel = secondMap[person.getId()]
|
||||||
|
elif length == 2:
|
||||||
|
p1 = common[0]
|
||||||
|
secondRel = firstMap[p1.getId()]
|
||||||
|
firstRel = secondMap[p1.getId()]
|
||||||
|
elif length > 2:
|
||||||
|
person = common[0]
|
||||||
|
secondRel = firstMap[person.getId()]
|
||||||
|
firstRel = secondMap[person.getId()]
|
||||||
|
|
||||||
|
if firstRel == -1:
|
||||||
|
return "No relationship to %s" % firstName
|
||||||
|
elif firstRel == 0:
|
||||||
|
if secondRel == 0:
|
||||||
|
return firstName
|
||||||
|
elif other_person.getGender() == RelLib.Person.male:
|
||||||
|
return get_father(firstName,secondName,secondRel)
|
||||||
|
else:
|
||||||
|
return get_mother(firstName,secondName,secondRel)
|
||||||
|
elif secondRel == 0:
|
||||||
|
if other_person.getGender() == RelLib.Person.male:
|
||||||
|
return get_son(firstName,secondName,firstRel)
|
||||||
|
else:
|
||||||
|
return get_daughter(firstName,secondName,firstRel)
|
||||||
|
elif firstRel == 1:
|
||||||
|
if other_person.getGender() == RelLib.Person.male:
|
||||||
|
return get_uncle(firstName,secondName,secondRel)
|
||||||
|
else:
|
||||||
|
return get_aunt(firstName,secondName,secondRel)
|
||||||
|
elif secondRel == 1:
|
||||||
|
if other_person.getGender() == RelLib.Person.male:
|
||||||
|
return get_nephew(firstName,secondName,firstRel-1)
|
||||||
|
else:
|
||||||
|
return get_niece(firstName,secondName,firstRel-1)
|
||||||
|
else:
|
||||||
|
if secondRel > firstRel:
|
||||||
|
return get_cousin(firstName,secondName,firstRel-1,secondRel-firstRel)
|
||||||
|
else:
|
||||||
|
return get_cousin(firstName,secondName,secondRel-1,firstRel-secondRel)
|
||||||
|
|
@ -3417,6 +3417,7 @@
|
|||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkScrolledWindow" id="scrolledwindow5">
|
<widget class="GtkScrolledWindow" id="scrolledwindow5">
|
||||||
|
<property name="border_width">6</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
|
<property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
|
||||||
<property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
|
<property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
|
||||||
@ -3432,11 +3433,11 @@
|
|||||||
<property name="justification">GTK_JUSTIFY_LEFT</property>
|
<property name="justification">GTK_JUSTIFY_LEFT</property>
|
||||||
<property name="wrap_mode">GTK_WRAP_WORD</property>
|
<property name="wrap_mode">GTK_WRAP_WORD</property>
|
||||||
<property name="cursor_visible">True</property>
|
<property name="cursor_visible">True</property>
|
||||||
<property name="pixels_above_lines">0</property>
|
<property name="pixels_above_lines">12</property>
|
||||||
<property name="pixels_below_lines">0</property>
|
<property name="pixels_below_lines">12</property>
|
||||||
<property name="pixels_inside_wrap">0</property>
|
<property name="pixels_inside_wrap">12</property>
|
||||||
<property name="left_margin">0</property>
|
<property name="left_margin">12</property>
|
||||||
<property name="right_margin">0</property>
|
<property name="right_margin">12</property>
|
||||||
<property name="indent">0</property>
|
<property name="indent">0</property>
|
||||||
<property name="text" translatable="yes"></property>
|
<property name="text" translatable="yes"></property>
|
||||||
</widget>
|
</widget>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# Gramps - a GTK+/GNOME based genealogy program
|
# Gramps - a GTK+/GNOME based genealogy program
|
||||||
#
|
#
|
||||||
# Copyright (C) 2000 Donald N. Allingham
|
# Copyright (C) 2000 Donald N. Allinghamg
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -73,6 +73,7 @@ import VersionControl
|
|||||||
import ReadXML
|
import ReadXML
|
||||||
import ListModel
|
import ListModel
|
||||||
import GrampsXML
|
import GrampsXML
|
||||||
|
import Relationship
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import GrampsZODB
|
import GrampsZODB
|
||||||
@ -764,6 +765,7 @@ class Gramps:
|
|||||||
self.full_update()
|
self.full_update()
|
||||||
|
|
||||||
def read_file(self,filename):
|
def read_file(self,filename):
|
||||||
|
self.topWindow.set_resizable(gtk.FALSE)
|
||||||
filename = os.path.normpath(os.path.abspath(filename))
|
filename = os.path.normpath(os.path.abspath(filename))
|
||||||
|
|
||||||
base = os.path.basename(filename)
|
base = os.path.basename(filename)
|
||||||
@ -786,7 +788,8 @@ class Gramps:
|
|||||||
self.topWindow.set_title("%s - GRAMPS" % name)
|
self.topWindow.set_title("%s - GRAMPS" % name)
|
||||||
else:
|
else:
|
||||||
GrampsCfg.save_last_file("")
|
GrampsCfg.save_last_file("")
|
||||||
|
self.topWindow.set_resizable(gtk.TRUE)
|
||||||
|
|
||||||
def on_ok_button2_clicked(self,obj):
|
def on_ok_button2_clicked(self,obj):
|
||||||
filename = obj.get_filename()
|
filename = obj.get_filename()
|
||||||
filename = os.path.normpath(os.path.abspath(filename))
|
filename = os.path.normpath(os.path.abspath(filename))
|
||||||
@ -1011,11 +1014,18 @@ class Gramps:
|
|||||||
self.edit_button.set_sensitive(val)
|
self.edit_button.set_sensitive(val)
|
||||||
|
|
||||||
def modify_statusbar(self):
|
def modify_statusbar(self):
|
||||||
|
|
||||||
if self.active_person == None:
|
if self.active_person == None:
|
||||||
self.status_text("")
|
self.status_text("")
|
||||||
else:
|
else:
|
||||||
pname = GrampsCfg.nameof(self.active_person)
|
if GrampsCfg.status_bar == 0:
|
||||||
name = "[%s] %s" % (self.active_person.getId(),pname)
|
name = GrampsCfg.nameof(self.active_person)
|
||||||
|
elif GrampsCfg.status_bar == 1:
|
||||||
|
pname = GrampsCfg.nameof(self.active_person)
|
||||||
|
name = "[%s] %s" % (self.active_person.getId(),pname)
|
||||||
|
else:
|
||||||
|
name = Relationship.get_relationship(self.db.getDefaultPerson(),
|
||||||
|
self.active_person)
|
||||||
self.status_text(name)
|
self.status_text(name)
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
@ -1304,34 +1314,37 @@ class Gramps:
|
|||||||
|
|
||||||
self.setup_bookmarks()
|
self.setup_bookmarks()
|
||||||
|
|
||||||
# mylist = self.db.getPersonEventTypes()
|
try:
|
||||||
# for type in mylist:
|
mylist = self.db.getPersonEventTypes()
|
||||||
# ntype = const.display_pevent(type)
|
for type in mylist:
|
||||||
# if ntype not in const.personalEvents:
|
ntype = const.display_pevent(type)
|
||||||
# const.personalEvents.append(ntype)
|
if ntype not in const.personalEvents:
|
||||||
#
|
const.personalEvents.append(ntype)
|
||||||
# mylist = self.db.getFamilyEventTypes()
|
|
||||||
# for type in mylist:
|
mylist = self.db.getFamilyEventTypes()
|
||||||
# ntype = const.display_fevent(type)
|
for type in mylist:
|
||||||
# if ntype not in const.marriageEvents:
|
ntype = const.display_fevent(type)
|
||||||
# const.marriageEvents.append(ntype)
|
if ntype not in const.marriageEvents:
|
||||||
#
|
const.marriageEvents.append(ntype)
|
||||||
# mylist = self.db.getPersonAttributeTypes()
|
|
||||||
# for type in mylist:
|
mylist = self.db.getPersonAttributeTypes()
|
||||||
# ntype = const.display_pattr(type)
|
for type in mylist:
|
||||||
# if ntype not in const.personalAttributes:
|
ntype = const.display_pattr(type)
|
||||||
# const.personalAttributes.append(ntype)
|
if ntype not in const.personalAttributes:
|
||||||
#
|
const.personalAttributes.append(ntype)
|
||||||
# mylist = self.db.getFamilyAttributeTypes()
|
|
||||||
# for type in mylist:
|
mylist = self.db.getFamilyAttributeTypes()
|
||||||
# if type not in const.familyAttributes:
|
for type in mylist:
|
||||||
# const.familyAttributes.append(type)
|
if type not in const.familyAttributes:
|
||||||
#
|
const.familyAttributes.append(type)
|
||||||
# mylist = self.db.getFamilyRelationTypes()
|
|
||||||
# for type in mylist:
|
mylist = self.db.getFamilyRelationTypes()
|
||||||
# if type not in const.familyRelations:
|
for type in mylist:
|
||||||
# const.familyRelations.append(type)
|
if type not in const.familyRelations:
|
||||||
#
|
const.familyRelations.append(type)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
GrampsCfg.save_last_file(name)
|
GrampsCfg.save_last_file(name)
|
||||||
self.gtop.get_widget("filter").set_text("")
|
self.gtop.get_widget("filter").set_text("")
|
||||||
|
|
||||||
|
@ -209,7 +209,8 @@ class CheckIntegrity:
|
|||||||
title = _("Check Integrity")
|
title = _("Check Integrity")
|
||||||
top = topDialog.get_widget("summary")
|
top = topDialog.get_widget("summary")
|
||||||
textwindow = topDialog.get_widget("textwindow")
|
textwindow = topDialog.get_widget("textwindow")
|
||||||
topDialog.get_widget("summaryTitle").set_text(title)
|
|
||||||
|
Utils.set_titles(top,topDialog.get_widget("title"),title)
|
||||||
textwindow.get_buffer().set_text(text)
|
textwindow.get_buffer().set_text(text)
|
||||||
top.show()
|
top.show()
|
||||||
|
|
||||||
|
@ -258,11 +258,11 @@ class Merge:
|
|||||||
pn2 = self.db.getPerson(p2)
|
pn2 = self.db.getPerson(p2)
|
||||||
MergeData.MergePeople(self.db,pn1,pn2,self.on_update)
|
MergeData.MergePeople(self.db,pn1,pn2,self.on_update)
|
||||||
|
|
||||||
def on_update(self,p1,p2):
|
def on_update(self,p1,p2,old_id):
|
||||||
self.dellist[p2] = p1
|
self.dellist[p2.getId()] = p1.getId()
|
||||||
for key in self.dellist.keys():
|
for key in self.dellist.keys():
|
||||||
if self.dellist[key] == p2:
|
if self.dellist[key] == p2.getId():
|
||||||
self.dellist[key] = p1
|
self.dellist[key] = p1.getId()
|
||||||
self.redraw()
|
self.redraw()
|
||||||
|
|
||||||
def update_and_destroy(self,obj):
|
def update_and_destroy(self,obj):
|
||||||
|
@ -132,7 +132,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="padding">0</property>
|
<property name="padding">0</property>
|
||||||
<property name="expand">True</property>
|
<property name="expand">False</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
@ -24,20 +24,6 @@
|
|||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="layout_style">GTK_BUTTONBOX_END</property>
|
<property name="layout_style">GTK_BUTTONBOX_END</property>
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkButton" id="button2">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="tooltip" translatable="yes">Calculate SoundEx code for the name</property>
|
|
||||||
<property name="can_default">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="label">gtk-apply</property>
|
|
||||||
<property name="use_stock">True</property>
|
|
||||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
|
||||||
<property name="response_id">0</property>
|
|
||||||
<signal name="clicked" handler="on_apply_clicked" object="name"/>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkButton" id="button3">
|
<widget class="GtkButton" id="button3">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
@ -49,7 +49,6 @@ class SoundGen:
|
|||||||
self.glade = gtk.glade.XML(glade_file,"soundEx")
|
self.glade = gtk.glade.XML(glade_file,"soundEx")
|
||||||
self.glade.signal_autoconnect({
|
self.glade.signal_autoconnect({
|
||||||
"destroy_passed_object" : Utils.destroy_passed_object,
|
"destroy_passed_object" : Utils.destroy_passed_object,
|
||||||
"on_apply_clicked" : self.on_apply_clicked,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
Utils.set_titles(self.glade.get_widget('soundEx'),
|
Utils.set_titles(self.glade.get_widget('soundEx'),
|
||||||
@ -58,6 +57,9 @@ class SoundGen:
|
|||||||
|
|
||||||
self.value = self.glade.get_widget("value")
|
self.value = self.glade.get_widget("value")
|
||||||
self.name = self.glade.get_widget("name")
|
self.name = self.glade.get_widget("name")
|
||||||
|
|
||||||
|
self.name.connect('changed',self.on_apply_clicked)
|
||||||
|
|
||||||
names = []
|
names = []
|
||||||
for person in self.db.getPersonMap().values():
|
for person in self.db.getPersonMap().values():
|
||||||
lastname = person.getPrimaryName().getSurname()
|
lastname = person.getPrimaryName().getSurname()
|
||||||
|
@ -738,7 +738,7 @@
|
|||||||
<widget class="GtkTable" id="table15">
|
<widget class="GtkTable" id="table15">
|
||||||
<property name="border_width">12</property>
|
<property name="border_width">12</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="n_rows">7</property>
|
<property name="n_rows">8</property>
|
||||||
<property name="n_columns">3</property>
|
<property name="n_columns">3</property>
|
||||||
<property name="homogeneous">False</property>
|
<property name="homogeneous">False</property>
|
||||||
<property name="row_spacing">6</property>
|
<property name="row_spacing">6</property>
|
||||||
@ -870,7 +870,6 @@
|
|||||||
<property name="active">True</property>
|
<property name="active">True</property>
|
||||||
<property name="inconsistent">False</property>
|
<property name="inconsistent">False</property>
|
||||||
<property name="draw_indicator">True</property>
|
<property name="draw_indicator">True</property>
|
||||||
<property name="group">tool1</property>
|
|
||||||
<signal name="toggled" handler="on_object_toggled" object="propertybox"/>
|
<signal name="toggled" handler="on_object_toggled" object="propertybox"/>
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
@ -893,7 +892,7 @@
|
|||||||
<property name="active">False</property>
|
<property name="active">False</property>
|
||||||
<property name="inconsistent">False</property>
|
<property name="inconsistent">False</property>
|
||||||
<property name="draw_indicator">True</property>
|
<property name="draw_indicator">True</property>
|
||||||
<property name="group">tool1</property>
|
<property name="group">stat1</property>
|
||||||
<signal name="toggled" handler="on_object_toggled" object="propertybox"/>
|
<signal name="toggled" handler="on_object_toggled" object="propertybox"/>
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
@ -905,6 +904,29 @@
|
|||||||
<property name="y_options"></property>
|
<property name="y_options"></property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkRadioButton" id="stat3">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="label" translatable="yes">Active person's _relationship to Home Person (English only)</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||||
|
<property name="active">True</property>
|
||||||
|
<property name="inconsistent">False</property>
|
||||||
|
<property name="draw_indicator">True</property>
|
||||||
|
<property name="group">stat1</property>
|
||||||
|
<signal name="toggled" handler="on_object_toggled" object="propertybox"/>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">1</property>
|
||||||
|
<property name="right_attach">3</property>
|
||||||
|
<property name="top_attach">7</property>
|
||||||
|
<property name="bottom_attach">8</property>
|
||||||
|
<property name="x_options">fill</property>
|
||||||
|
<property name="y_options"></property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="padding">0</property>
|
<property name="padding">0</property>
|
||||||
|
Loading…
Reference in New Issue
Block a user