diff --git a/src/Config.py b/src/Config.py
index 72185906c..350a3fd7e 100644
--- a/src/Config.py
+++ b/src/Config.py
@@ -68,12 +68,16 @@ _date_format_list = [
_("DD-MM-YYYY"),
_("MM.DD.YYYY"),
_("DD.MM.YYYY"),
- _("DD. Month Year")
+ _("DD. Month Year"),
+ _("YYYY/MM/DD"),
+ _("YYYY-MM-DD"),
+ _("YYYY.MM.DD"),
]
_date_entry_list = [
_("MM/DD/YYYY, MM.DD.YYYY, or MM-DD-YYYY"),
- _("DD/MM/YYYY, DD.MM.YYYY, or DD-MM-YYYY")
+ _("DD/MM/YYYY, DD.MM.YYYY, or DD-MM-YYYY"),
+ _("YYYY/MM/DD, YYYY.MM.DD, or YYYY-MM-DD"),
]
_name_format_list = [
@@ -102,6 +106,7 @@ output_preference = None
report_dir = "./"
web_dir = "./"
db_dir = "./"
+id_visible = 0
#-------------------------------------------------------------------------
#
@@ -142,6 +147,7 @@ def loadConfig(call):
global autoload
global owner
global usetabs
+ global id_visible
global show_detail
global hide_altnames
global lastfile
@@ -161,6 +167,7 @@ def loadConfig(call):
_callback = call
lastfile = gnome.config.get_string("/gramps/data/LastFile")
usetabs = gnome.config.get_bool("/gramps/config/UseTabs")
+ id_visible = gnome.config.get_bool("/gramps/config/IdVisible")
show_detail = gnome.config.get_bool("/gramps/config/ShowDetail")
status_bar = gnome.config.get_int("/gramps/config/StatusBar")
display_attr = gnome.config.get_bool("/gramps/config/DisplayAttr")
@@ -229,6 +236,8 @@ def loadConfig(call):
autoload = 1
if usetabs == None:
usetabs = 0
+ if id_visible == None:
+ id_visible = 0
if show_detail == None:
show_detail = 0
if status_bar == None:
@@ -318,6 +327,7 @@ def on_propertybox_apply(obj,page):
global nameof
global owner
global usetabs
+ global id_visible
global status_bar
global display_attr
global attr_name
@@ -337,6 +347,7 @@ def on_propertybox_apply(obj,page):
display_attr = prefsTop.get_widget("attr_display").get_active()
attr_name = string.strip(prefsTop.get_widget("attr_name").get_text())
usetabs = prefsTop.get_widget("usetabs").get_active()
+ id_visible = prefsTop.get_widget("gid_visible").get_active()
hide_altnames = prefsTop.get_widget("display_altnames").get_active()
paper_obj = prefsTop.get_widget("paper_size").get_menu().get_active()
output_obj = prefsTop.get_widget("output_format").get_menu().get_active()
@@ -364,6 +375,7 @@ def on_propertybox_apply(obj,page):
output_preference = output_obj.get_data("d")
gnome.config.set_bool("/gramps/config/UseTabs",usetabs)
+ gnome.config.set_bool("/gramps/config/IdVisible",id_visible)
gnome.config.set_bool("/gramps/config/ShowDetail",show_detail)
gnome.config.set_int("/gramps/config/StatusBar",status_bar)
gnome.config.set_bool("/gramps/config/DisplayAttr",display_attr)
@@ -499,6 +511,7 @@ def display_preferences_box():
pbox = prefsTop.get_widget("propertybox")
auto = prefsTop.get_widget("autoload")
+ vis = prefsTop.get_widget("gid_visible")
tabs = prefsTop.get_widget("usetabs")
detail = prefsTop.get_widget("showdetail")
display_attr_obj = prefsTop.get_widget("attr_display")
@@ -506,6 +519,7 @@ def display_preferences_box():
auto.set_active(autoload)
detail.set_active(show_detail)
tabs.set_active(usetabs)
+ vis.set_active(id_visible)
if status_bar == 0:
prefsTop.get_widget("stat1").set_active(1)
diff --git a/src/Date.py b/src/Date.py
index 35364c4a1..bcaf0c10a 100644
--- a/src/Date.py
+++ b/src/Date.py
@@ -626,16 +626,51 @@ class SingleDate:
if self.month == -1:
retval = str(self.year)
elif self.year == -1:
- retval = "%d%s??%s??" % (self.month+1,sep,sep)
+ retval = "%02d%s??%s??" % (self.month+1,sep,sep)
else:
- retval = "%d%s??%s%d" % (self.month+1,sep,sep,self.year)
+ retval = "%02d%s??%s%04d" % (self.month+1,sep,sep,self.year)
elif self.month == -1:
- retval = "??%s%d%s%d" % (sep,self.day,sep,self.year)
+ retval = "??%s%02d%s%04d" % (sep,self.day,sep,self.year)
else:
if self.year == -1:
- retval = "%d%s%d%s????" % (self.month+1,sep,self.day,sep)
+ retval = "%02d%s%02d%s????" % (self.month+1,sep,self.day,sep)
else:
- retval = "%d%s%d%s%d" % (self.month+1,sep,self.day,sep,self.year)
+ retval = "%02d%s%02d%s%04d" % (self.month+1,sep,self.day,sep,self.year)
+
+ if self.mode == SingleDate.about:
+ retval = "%s %s" % (_("ABT"),retval)
+
+ if self.mode == SingleDate.before:
+ retval = "%s %s" % (_("BEFORE"),retval)
+ elif self.mode == SingleDate.after:
+ retval = "%s %s" % (_("AFTER"),retval)
+
+ return retval
+
+ #--------------------------------------------------------------------
+ #
+ #
+ #
+ #--------------------------------------------------------------------
+ def get_yyyymmdd(self,sep):
+ retval = ""
+
+ if self.month == -1 and self.day == -1 and self.year == -1 :
+ pass
+ elif self.day == -1:
+ if self.month == -1:
+ retval = str(self.year)
+ elif self.year == -1:
+ retval = "????%s%02d%s??" % (sep,self.month+1,sep)
+ else:
+ retval = "%04d%s%02d%s??" % (self.year,sep,self.month+1,sep)
+ elif self.month == -1:
+ retval = "%04d%s??%s%02d" % (self.year,sep,sep,self.day)
+ else:
+ if self.year == -1:
+ retval = "????%02d%s%02d%s" % (self.month+1,sep,self.day,sep)
+ else:
+ retval = "%02d%s%02d%s%02d" % (self.year,sep,self.month+1,sep,self.day)
if self.mode == SingleDate.about:
retval = "%s %s" % (_("ABT"),retval)
@@ -685,16 +720,16 @@ class SingleDate:
if self.month == -1:
retval = str(self.year)
elif self.year == -1:
- retval = "??%s%d%s??" % (sep,self.month+1,sep)
+ retval = "??%s%02d%s??" % (sep,self.month+1,sep)
else:
- retval = "??%s%d%s%d" % (sep,self.month+1,sep,self.year)
+ retval = "??%s%02d%s%04d" % (sep,self.month+1,sep,self.year)
elif self.month == -1:
- retval = "%d%s??%s%d" % (self.day,sep,sep,self.year)
+ retval = "%02d%s??%s%04d" % (self.day,sep,sep,self.year)
else:
if self.year == -1:
- retval = "%d%s%d%s????" % (self.day,sep,self.month+1,sep)
+ retval = "%02d%s%02d%s????" % (self.day,sep,self.month+1,sep)
else:
- retval = "%d%s%d%s%d" % (self.day,sep,self.month+1,sep,self.year)
+ retval = "%02d%s%02d%s%04d" % (self.day,sep,self.month+1,sep,self.year)
if self.mode == SingleDate.about:
retval = "%s %s" % (_("ABT"),retval)
@@ -728,13 +763,39 @@ class SingleDate:
def getFmt9(self):
return self.get_ddmmyyyy(".")
+
+ #--------------------------------------------------------------------
+ #
+ #
+ #
+ #--------------------------------------------------------------------
+ def getFmt11(self):
+ return self.get_yyyymmdd("/")
+
+ #--------------------------------------------------------------------
+ #
+ #
+ #
+ #--------------------------------------------------------------------
+ def getFmt12(self):
+ return self.get_yyyymmdd("-")
+
+ #--------------------------------------------------------------------
+ #
+ #
+ #
+ #--------------------------------------------------------------------
+ def getFmt13(self):
+ return self.get_yyyymmdd(".")
+
#--------------------------------------------------------------------
#
#
#
#--------------------------------------------------------------------
fmtFunc = [ getFmt1, getFmt2, getFmt3, getFmt4, getFmt5, getFmt6,
- getFmt7, getFmt8, getFmt9, getFmt10 ]
+ getFmt7, getFmt8, getFmt9, getFmt10, getFmt11, getFmt12,
+ getFmt13]
#--------------------------------------------------------------------
#
@@ -824,7 +885,12 @@ class SingleDate:
self.day = int(matches[2])
except ValueError:
self.day = -1
- else:
+ val = matches[3]
+ if val == None or val[0] == '?':
+ self.year = -1
+ else:
+ self.year = int(val)
+ elif Date.entryCode == 1:
try:
self.month = int(matches[2])-1
if self.month > 11:
@@ -835,11 +901,27 @@ class SingleDate:
self.day = int(matches[1])
except ValueError:
self.day = -1
- val = matches[3]
- if val == None or val[0] == '?':
- self.year = -1
+ val = matches[3]
+ if val == None or val[0] == '?':
+ self.year = -1
+ else:
+ self.year = int(val)
else:
- self.year = int(val)
+ try:
+ self.month = int(matches[2])-1
+ if self.month > 11:
+ raise Date.Error,text
+ except ValueError:
+ self.month = -1
+ try:
+ self.day = int(matches[3])
+ except ValueError:
+ self.day = -1
+ val = matches[1]
+ if val == None or val[0] == '?':
+ self.year = -1
+ else:
+ self.year = int(val)
return 1
match = SingleDate.fmt1.match(text)
diff --git a/src/EditPerson.glade b/src/EditPerson.glade
index 4990bc5b4..c30051804 100644
--- a/src/EditPerson.glade
+++ b/src/EditPerson.glade
@@ -198,30 +198,6 @@
-
- GtkEntry
- birthPlace
- True
- True
- True
- 0
-
-
- 1
- 2
- 1
- 2
- 5
- 5
- True
- False
- False
- False
- True
- False
-
-
-
GtkHBox
hbox19
@@ -280,6 +256,42 @@
+
+
+ GtkCombo
+ bp_combo
+ False
+ True
+ False
+ True
+ False
+
+
+ 1
+ 2
+ 1
+ 2
+ 5
+ 5
+ True
+ False
+ False
+ False
+ True
+ False
+
+
+
+ GtkEntry
+ GtkCombo:entry
+ birthPlace
+ True
+ True
+ True
+ 0
+
+
+
@@ -390,31 +402,6 @@
-
- GtkEntry
- deathPlace
- 200
- True
- True
- True
- 0
-
-
- 1
- 2
- 1
- 2
- 5
- 5
- True
- False
- False
- False
- True
- False
-
-
-
GtkHBox
hbox20
@@ -473,6 +460,42 @@
+
+
+ GtkCombo
+ dp_combo
+ False
+ True
+ False
+ True
+ False
+
+
+ 1
+ 2
+ 1
+ 2
+ 5
+ 5
+ True
+ False
+ False
+ False
+ True
+ False
+
+
+
+ GtkEntry
+ GtkCombo:entry
+ deathPlace
+ True
+ True
+ True
+ 0
+
+
+
@@ -1556,38 +1579,6 @@
-
- GnomeEntry
- ePlaceBox
- event_place
- 15
-
- 1
- 3
- 2
- 3
- 3
- 3
- True
- False
- False
- False
- True
- False
-
-
-
- GtkEntry
- GnomeEntry:entry
- eventPlace
- True
- True
- True
- 0
-
-
-
-
GnomeEntry
eDescBox
@@ -1736,6 +1727,42 @@
False
+
+
+ GtkCombo
+ eventPlace_combo
+ False
+ True
+ False
+ True
+ False
+
+
+ 1
+ 3
+ 2
+ 3
+ 3
+ 3
+ True
+ False
+ False
+ False
+ True
+ False
+
+
+
+ GtkEntry
+ GtkCombo:entry
+ eventPlace
+ True
+ True
+ True
+ 0
+
+
+
diff --git a/src/EditPerson.py b/src/EditPerson.py
index 5dd102ec8..2d9943dfa 100644
--- a/src/EditPerson.py
+++ b/src/EditPerson.py
@@ -188,6 +188,10 @@ class EditPerson:
self.name_list.set_column_visibility(1,Config.show_detail)
self.attr_list.set_column_visibility(2,Config.show_detail)
self.address_list.set_column_visibility(2,Config.show_detail)
+ if len(const.places) > 0:
+ self.get_widget("dp_combo").set_popdown_strings(const.places)
+ self.get_widget("bp_combo").set_popdown_strings(const.places)
+ self.get_widget("eventPlace_combo").set_popdown_strings(const.places)
if Config.display_attr:
self.get_widget("user_label").set_text(Config.attr_name)
@@ -219,7 +223,7 @@ class EditPerson:
self.bplace.set_text(birth.getPlace())
self.ddate.set_text(death.getDate())
self.dplace.set_text(death.getPlace())
-
+
# load photos into the photo window
photo_list = person.getPhotoList()
if len(photo_list) != 0:
@@ -734,7 +738,7 @@ def on_add_attr_clicked(obj):
attr = Attribute()
name = edit_person_obj.attr_type.get_text()
- attr.setType(const.set_pattr(name))
+ attr.setType(const.save_pattr(name))
attr.setValue(edit_person_obj.attr_value.get_text())
if name not in const.personalAttributes:
@@ -792,6 +796,13 @@ def on_event_add_clicked(obj):
menu = edit_person_obj.get_widget("personalEvents")
menu.set_popdown_strings(const.personalEvents)
+ if place not in const.places:
+ const.places.append(place)
+ const.places.sort()
+ edit_person_obj.get_widget("dp_place").set_popdown_strings(const.places)
+ edit_person_obj.get_widget("bp_place").set_popdown_strings(const.places)
+ edit_person_obj.get_widget("eventPlace_combo").set_popdown_strings(const.places)
+
edit_person_obj.person.addEvent(event)
edit_person_obj.redraw_event_list()
utils.modified()
@@ -1015,6 +1026,9 @@ def on_apply_person_clicked(obj):
if surname != name.getSurname():
name.setSurname(surname)
+ if surname not in edit_person_obj.surname_list:
+ edit_person_obj.surname_list.append(surname)
+ edit_person_obj.surname_list.sort()
utils.modified()
if given != name.getFirstName():
@@ -1037,6 +1051,11 @@ def on_apply_person_clicked(obj):
ddate = edit_person_obj.ddate.get_text()
dplace = edit_person_obj.dplace.get_text()
+ for place in [ dplace, bplace ]:
+ if place not in const.places:
+ const.places.append(place)
+ const.places.sort()
+
newBirth = Event()
newBirth.set("Birth",bdate,bplace,"")
diff --git a/src/GrampsParser.py b/src/GrampsParser.py
index cd59a8157..e027b3025 100644
--- a/src/GrampsParser.py
+++ b/src/GrampsParser.py
@@ -272,7 +272,11 @@ class GrampsParser(handler.ContentHandler):
family = self.db.findFamilyNoMap(u2l(attrs["ref"]))
if attrs.has_key("type"):
type = u2l(attrs["type"])
- self.person.AltFamilyList.append((family,type))
+ self.person.AltFamilyList.append((family,type,type))
+ elif attrs.has_key("mrel"):
+ mrel = u2l(attrs["mrel"])
+ frel = u2l(attrs["frel"])
+ self.person.AltFamilyList.append((family,mrel,frel))
else:
self.person.MainFamily = family
diff --git a/src/ListColors.py b/src/ListColors.py
index d1c8c2f30..456f70e2c 100644
--- a/src/ListColors.py
+++ b/src/ListColors.py
@@ -22,16 +22,11 @@ from gtk import *
import sys
-if sys.version[:3] == "1.5":
- color_ok = 1
-else:
- color_ok = 0
-
-enable = 0
-oddbg = (0xffff,0xffff,0xffff)
-evenbg = (0xffff,0xffff,0xffff)
-oddfg = (0,0,0)
-evenfg = (0,0,0)
+_enable = 0
+oddbg = (0xffff,0xffff,0xffff)
+evenbg = (0xffff,0xffff,0xffff)
+oddfg = (0,0,0)
+evenfg = (0,0,0)
class ColorList:
def __init__(self,clist,increment):
@@ -39,15 +34,18 @@ class ColorList:
self.modval = 2*increment
self.increment = increment
self.clist = clist
- if color_ok:
+ self.color_ok = 1
+ try:
self.oddbg = GdkColor(oddbg[0],oddbg[1],oddbg[2])
self.oddfg = GdkColor(oddfg[0],oddfg[1],oddfg[2])
self.evenbg = GdkColor(evenbg[0],evenbg[1],evenbg[2])
self.evenfg = GdkColor(evenfg[0],evenfg[1],evenfg[2])
+ except OverflowError:
+ self.color_ok = 0
def add(self,list):
self.clist.append(list)
- if enable and color_ok:
+ if _enable and self.color_ok:
if self.index % self.modval < self.increment:
self.clist.set_background(self.index,self.oddbg)
self.clist.set_foreground(self.index,self.oddfg)
@@ -61,12 +59,9 @@ class ColorList:
self.clist.set_row_data(self.index-1,data)
def set_enable(val):
- global enable
+ global _enable
- if color_ok:
- enable = val
- else:
- enable = 0
+ _enable = val
def get_enable():
- return enable
+ return _enable
diff --git a/src/RelLib.py b/src/RelLib.py
index 37b195050..ff711b7bb 100644
--- a/src/RelLib.py
+++ b/src/RelLib.py
@@ -434,8 +434,8 @@ class Person:
def getAltFamilyList(self) :
return self.AltFamilyList
- def addAltFamily(self,family,type) :
- self.AltFamilyList.append((family,type))
+ def addAltFamily(self,family,mrel,frel) :
+ self.AltFamilyList.append((family,mrel,frel))
def removeAltFamily(self,family):
index = 0
@@ -888,6 +888,16 @@ class RelDataBase:
map[attr.getName()] = 1
return map.keys()
+ def getPlaces(self):
+ map = {}
+ for family in self.familyMap.values():
+ for attr in family.getEventList():
+ map[attr.getPlace()] = 1
+ for person in self.personMap.values():
+ for attr in person.getEventList():
+ map[attr.getPlace()] = 1
+ return map.keys()
+
def getFamilyRelationTypes(self):
map = {}
for family in self.familyMap.values():
diff --git a/src/WriteXML.py b/src/WriteXML.py
index f78c08844..4736a5a13 100644
--- a/src/WriteXML.py
+++ b/src/WriteXML.py
@@ -307,8 +307,8 @@ def exportData(database, filename, callback):
write_ref(g,"childof",person.getMainFamily())
for alt in person.getAltFamilyList():
- g.write("\n")
+ g.write("\n" % \
+ (str(alt[0].getId()), alt[1], alt[2]))
for family in person.getFamilyList():
write_ref(g,"parentin",family)
diff --git a/src/config.glade b/src/config.glade
index e5cbf5fad..f9f05b448 100644
--- a/src/config.glade
+++ b/src/config.glade
@@ -176,6 +176,35 @@
False
+
+
+ GtkCheckButton
+ gid_visible
+ True
+
+ toggled
+ on_object_toggled
+
+ Thu, 12 Jul 2001 13:42:44 GMT
+
+
+ False
+ True
+
+ 0
+ 1
+ 2
+ 3
+ 5
+ 5
+ False
+ False
+ False
+ False
+ True
+ False
+
+
diff --git a/src/const.py b/src/const.py
index 502c0a678..9c52f97a5 100644
--- a/src/const.py
+++ b/src/const.py
@@ -105,11 +105,12 @@ female = _("female")
output_formats = ["OpenOffice", "AbiWord", "PDF", "HTML" ]
-childRelations = [
- "Birth",
- "Adopted",
- "Other"
- ]
+childRelations = {
+ _("Birth") : "Birth",
+ _("Adopted") : "Adopted",
+ _("Stepchild") : "Stepchild",
+ _("Unknown") : "Unknown",
+ }
#-------------------------------------------------------------------------
#
@@ -171,6 +172,7 @@ def save_fevent(st):
#-------------------------------------------------------------------------
personalConstantEvents = {
"Adopted" : "ADOP",
+ "Adult Christening" : "CHRA",
"Alternate Birth" : "BIRT",
"Alternate Death" : "DEAT",
"Baptism (LDS)" : "BAPL",
@@ -179,6 +181,7 @@ personalConstantEvents = {
"Bas Mitzvah" : "BASM",
"Burial" : "BURI",
"Cause Of Death" : "CAUS",
+ "Ordination" : "ORID",
"Census" : "CENS",
"Christening" : "CHR" ,
"Confirmation" : "CONF",
@@ -188,21 +191,24 @@ personalConstantEvents = {
"Education" : "EDUC",
"Elected" : "_ELEC",
"Emigration" : "EMIG",
+ "First Communion" : "FCOM",
"Graduation" : "GRAD",
"Military Service" : "_MILT",
"Naturalization" : "NATU",
+ "Immigration" : "IMMI",
"Occupation" : "OCCU",
"Probate" : "PROB",
"Religion" : "RELI",
- "Residence" : "RESI",
"Residence" : "RESI",
- "Retirement" : "RETI"
+ "Retirement" : "RETI",
+ "Will" : "WILL"
}
_pe_e2l = {
"Adopted" : _("Adopted"),
"Alternate Birth" : _("Alternate Birth"),
"Alternate Death" : _("Alternate Death"),
+ "Adult Christening" : _("Adult Christening"),
"Baptism (LDS)" : _("Baptism (LDS)"),
"Baptism" : _("Baptism"),
"Bar Mitzvah" : _("Bar Mitzvah"),
@@ -218,14 +224,18 @@ _pe_e2l = {
"Education" : _("Education"),
"Elected" : _("Elected"),
"Emigration" : _("Emigration"),
+ "First Communion" : _("First Communion"),
+ "Immigration" : _("Immigration"),
"Graduation" : _("Graduation"),
"Military Service" : _("Military Service"),
"Naturalization" : _("Naturalization"),
"Occupation" : _("Occupation"),
+ "Ordination" : _("Ordination"),
"Probate" : _("Probate"),
"Religion" : _("Religion"),
"Residence" : _("Residence"),
"Retirement" : _("Retirement"),
+ "Will" : _("Will")
}
_pe_l2e = {}
@@ -260,14 +270,18 @@ def save_pevent(st):
#
#-------------------------------------------------------------------------
personalConstantAttributes = {
+ "Caste" : "CAST",
"Description" : "DSCR",
"Identification Number" : "IDNO",
+ "National Origin" : "NATI",
"Social Security Number": "SSN"
}
_pa_e2l = {
+ "Caste" : _("Caste"),
"Description" : _("Description"),
"Identification Number" : _("Identification Number"),
+ "National Origin" : _("National Origin"),
"Social Security Number": _("Social Security Number")
}
@@ -438,3 +452,4 @@ personalAttributes = initialize_personal_attribute_list()
marriageEvents = initialize_marriage_event_list()
familyAttributes = initialize_family_attribute_list()
familyRelations = initialize_family_relation_list()
+places = []
diff --git a/src/gramps.glade b/src/gramps.glade
index 8d010f97f..11fe5343b 100644
--- a/src/gramps.glade
+++ b/src/gramps.glade
@@ -706,8 +706,8 @@
on_person_list_click_column
Thu, 07 Dec 2000 14:37:54 GMT
- 4
- 242,74,176,100
+ 5
+ 250,40,70,150,100
GTK_SELECTION_SINGLE
True
GTK_SHADOW_IN
@@ -768,6 +768,19 @@
+
+ GtkLabel
+ CList:title
+ glabel5
+
+ GTK_JUSTIFY_CENTER
+ False
+ 0.5
+ 0.5
+ 0
+ 0
+
+
GtkLabel
CList:title
@@ -976,13 +989,10 @@
0
- GtkTable
- table2
- 5
- 6
+ GtkHBox
+ hbox26
False
- 0
- 0
+ 0
0
False
@@ -990,378 +1000,88 @@
- GtkButton
- father_next
- Make the current father the active person
- True
-
- clicked
- on_father_next_clicked
- Sat, 21 Oct 2000 03:42:21 GMT
-
- GTK_RELIEF_NORMAL
+ GtkVBox
+ vbox36
+ False
+ 0
- 5
- 6
- 0
- 1
- 3
- 0
- False
- False
- False
- False
- False
- False
+ 0
+ True
+ True
- GtkArrow
- arrow6
- 10
- 10
- GTK_ARROW_RIGHT
- GTK_SHADOW_OUT
- 0.5
- 0.5
- 0
- 0
-
-
-
-
- GtkButton
- mother_next
- Make the current mother the active person
- True
-
- clicked
- on_mother_next_clicked
- Sat, 21 Oct 2000 03:41:15 GMT
-
- GTK_RELIEF_NORMAL
-
- 5
- 6
- 2
- 3
- 3
- 0
- False
- False
- False
- False
- False
- False
-
-
-
- GtkArrow
- arrow7
- 10
- 10
- GTK_ARROW_RIGHT
- GTK_SHADOW_OUT
- 0.5
- 0.5
- 0
- 0
-
-
-
-
- GtkButton
- button41
- Select the active person's parents
- True
-
- clicked
- on_choose_parents_clicked
- Sun, 19 Nov 2000 21:50:03 GMT
-
-
- GTK_RELIEF_NORMAL
-
- 3
- 5
- 3
- 4
- 0
- 0
- False
- False
- False
- False
- False
- False
-
-
-
-
- GtkButton
- button21
- Edit the active person's marriages
- True
-
- clicked
- on_edit_marriage_clicked
- Fri, 24 Nov 2000 15:51:13 GMT
-
-
- GTK_RELIEF_NORMAL
-
- 0
- 2
- 4
- 5
- 0
- 3
- False
- False
- False
- False
- False
- False
-
-
-
-
- GtkEntry
- fv_mother
- True
- False
- True
- 0
-
-
- 4
- 5
- 2
- 3
- 5
- 10
- True
- False
- False
- False
- True
- False
-
-
-
-
- GtkEntry
- fv_father
- True
- False
- True
- 0
-
-
- 4
- 5
- 0
- 1
- 5
- 10
- True
- False
- False
- False
- True
- False
-
-
-
-
- GtkEntry
- fv_person
- True
- False
- True
- 0
-
-
- 1
- 2
- 1
- 2
- 5
- 0
- True
- False
- False
- False
- True
- False
-
-
-
-
- GtkButton
- editMother
- True
-
- clicked
- on_edit_mother_clicked
- Thu, 21 Dec 2000 22:51:56 GMT
-
-
- GTK_RELIEF_NORMAL
-
- 3
- 4
- 2
- 3
- 5
- 0
- False
- False
- False
- False
- True
- False
-
-
-
-
- GtkButton
- editFather
- True
-
- clicked
- on_edit_father_clicked
- Thu, 21 Dec 2000 22:51:49 GMT
-
-
- GTK_RELIEF_NORMAL
-
- 3
- 4
- 0
- 1
- 5
- 0
- False
- False
- False
- False
- True
- False
-
-
-
-
- GtkNotebook
- lab_or_list
- False
- False
- GTK_POS_TOP
- False
- 2
- 2
- False
-
- 1
- 2
- 3
- 4
- 5
- 0
- False
- False
- False
- False
- True
- True
-
-
-
- GtkEntry
- fv_spouse1
- True
- False
- True
- 0
-
-
-
-
- GtkLabel
- Notebook:tab
- label199
-
- GTK_JUSTIFY_CENTER
- False
- 0.5
- 0.5
- 0
- 0
-
-
-
- GtkOptionMenu
- fv_spouse
- True
-
- 0
-
-
-
- GtkLabel
- Notebook:tab
- label200
-
- GTK_JUSTIFY_CENTER
- False
- 0.5
- 0.5
- 0
- 0
-
-
-
-
- GtkButton
- button22
- 3
- Exchange active person and displayed spouse
- True
-
- clicked
- on_swap_clicked
-
- Tue, 07 Nov 2000 02:58:26 GMT
-
- GTK_RELIEF_NORMAL
-
- 1
- 2
- 2
- 3
- 0
- 0
- False
- False
- False
- False
- False
- False
-
-
-
- GtkVBox
- vbox14
- False
- 0
+ GtkFrame
+ frame3
+ 5
+
+ 0
+ GTK_SHADOW_ETCHED_IN
+
+ 0
+ False
+ True
+
- GtkArrow
- arrow9
- 11
- 11
- GTK_ARROW_UP
- GTK_SHADOW_OUT
+ GtkHBox
+ hbox27
+ False
+ 0
+
+
+ GtkButton
+ editMainPerson
+ 5
+ True
+
+ clicked
+ on_edit_active_person
+ Thu, 21 Dec 2000 22:51:33 GMT
+
+
+ GTK_RELIEF_NORMAL
+
+ 5
+ False
+ False
+
+
+
+
+ GtkEntry
+ fv_person
+ True
+ False
+ True
+ 0
+
+
+ 5
+ True
+ True
+
+
+
+
+
+
+ GtkHBox
+ hbox28
+ False
+ 0
+
+ 0
+ False
+ True
+
+
+
+ GtkLabel
+ label226
+
+ GTK_JUSTIFY_CENTER
+ False
0.5
0.5
0
@@ -1369,115 +1089,550 @@
0
True
- True
+ False
- GtkArrow
- arrow10
- 11
- 11
- GTK_ARROW_DOWN
- GTK_SHADOW_OUT
+ GtkButton
+ button22
+ 3
+ Exchange active person and displayed spouse
+ True
+
+ clicked
+ on_swap_clicked
+
+ Tue, 07 Nov 2000 02:58:26 GMT
+
+ GTK_RELIEF_NORMAL
+
+ 0
+ False
+ False
+
+
+
+ GtkVBox
+ vbox14
+ False
+ 0
+
+
+ GtkArrow
+ arrow9
+ 11
+ 11
+ GTK_ARROW_UP
+ GTK_SHADOW_OUT
+ 0.5
+ 0.5
+ 0
+ 0
+
+ 0
+ True
+ True
+
+
+
+
+ GtkArrow
+ arrow10
+ 11
+ 11
+ GTK_ARROW_DOWN
+ GTK_SHADOW_OUT
+ 0.5
+ 0.5
+ 0
+ 0
+
+ 0
+ False
+ False
+
+
+
+
+
+
+ GtkLabel
+ label227
+
+ GTK_JUSTIFY_CENTER
+ False
0.5
0.5
0
0
0
- False
+ True
False
+
+
+ GtkFrame
+ frame1
+ 5
+
+ 0
+ GTK_SHADOW_ETCHED_IN
+
+ 0
+ False
+ True
+
+
+
+ GtkVBox
+ vbox35
+ False
+ 0
+
+
+ GtkHBox
+ hbox25
+ 5
+ False
+ 0
+
+ 0
+ False
+ True
+
+
+
+ GtkButton
+ editSpouse
+ True
+
+ clicked
+ on_edit_spouse_clicked
+ Thu, 21 Dec 2000 22:51:41 GMT
+
+
+ GTK_RELIEF_NORMAL
+
+ 5
+ False
+ False
+
+
+
+
+ GtkNotebook
+ lab_or_list
+ False
+ False
+ GTK_POS_TOP
+ False
+ 2
+ 2
+ False
+
+ 5
+ True
+ True
+
+
+
+ GtkEntry
+ fv_spouse1
+ True
+ False
+ True
+ 0
+
+
+
+
+ GtkLabel
+ Notebook:tab
+ label224
+
+ GTK_JUSTIFY_CENTER
+ False
+ 0.5
+ 0.5
+ 0
+ 0
+
+
+
+ GtkOptionMenu
+ fv_spouse
+ True
+
+
+ 0
+
+
+
+ GtkLabel
+ Notebook:tab
+ label225
+
+ GTK_JUSTIFY_CENTER
+ False
+ 0.5
+ 0.5
+ 0
+ 0
+
+
+
+
+
+ GtkHButtonBox
+ hbuttonbox22
+ 4
+ GTK_BUTTONBOX_SPREAD
+ 0
+ 85
+ 27
+ 0
+ 0
+
+ 0
+ False
+ False
+
+
+
+ GtkButton
+ add_sp
+ True
+ True
+
+ clicked
+ on_add_sp_clicked
+ Thu, 12 Jul 2001 23:05:04 GMT
+
+
+ GTK_RELIEF_NORMAL
+
+
+
+ GtkButton
+ edit_sp
+ True
+ True
+
+ clicked
+ on_edit_sp_clicked
+ Thu, 12 Jul 2001 23:05:41 GMT
+
+
+ GTK_RELIEF_NORMAL
+
+
+
+ GtkButton
+ delete_sp
+ True
+ True
+
+ clicked
+ on_delete_sp_clicked
+ Thu, 12 Jul 2001 23:07:31 GMT
+
+
+ GTK_RELIEF_NORMAL
+
+
+
+
- GtkOptionMenu
- childtype
- True
-
- 0
+ GtkFrame
+ frame2
+ 5
+
+ 0
+ GTK_SHADOW_ETCHED_IN
- 4
- 5
- 1
- 2
- 5
- 0
- False
- False
- False
- False
- True
- False
+ 0
+ True
+ True
-
-
- GtkButton
- editMainPerson
- True
-
- clicked
- on_edit_active_person
- Thu, 21 Dec 2000 22:51:33 GMT
-
-
- GTK_RELIEF_NORMAL
-
- 0
- 1
- 1
- 2
- 5
- 5
- False
- False
- False
- False
- True
- False
-
-
+
+ GtkVBox
+ vbox37
+ False
+ 0
-
- GtkButton
- editSpouse
- True
-
- clicked
- on_edit_spouse_clicked
- Thu, 21 Dec 2000 22:51:41 GMT
-
-
- GTK_RELIEF_NORMAL
-
- 0
- 1
- 3
- 4
- 5
- 5
- False
- False
- False
- False
- True
- False
-
-
-
+
+ GtkTable
+ table24
+ 3
+ 3
+ False
+ 0
+ 0
+
+ 0
+ False
+ True
+
-
- GtkHSeparator
- hseparator1
-
- 0
- False
- True
-
+
+ GtkButton
+ editFather
+ 5
+ True
+
+ clicked
+ on_edit_father_clicked
+ Thu, 21 Dec 2000 22:51:49 GMT
+
+
+ GTK_RELIEF_NORMAL
+
+ 0
+ 1
+ 0
+ 1
+ 0
+ 0
+ False
+ False
+ False
+ False
+ True
+ False
+
+
+
+
+ GtkEntry
+ fv_father
+ True
+ False
+ True
+ 0
+
+
+ 1
+ 2
+ 0
+ 1
+ 5
+ 5
+ True
+ False
+ False
+ False
+ True
+ False
+
+
+
+
+ GtkButton
+ father_next
+ Make the current father the active person
+ True
+
+ clicked
+ on_father_next_clicked
+ Sat, 21 Oct 2000 03:42:21 GMT
+
+ GTK_RELIEF_NORMAL
+
+ 2
+ 3
+ 0
+ 1
+ 5
+ 5
+ False
+ False
+ False
+ False
+ True
+ False
+
+
+
+ GtkArrow
+ arrow6
+ 10
+ 10
+ GTK_ARROW_RIGHT
+ GTK_SHADOW_OUT
+ 0.5
+ 0.5
+ 0
+ 0
+
+
+
+
+ GtkButton
+ editMother
+ True
+
+ clicked
+ on_edit_mother_clicked
+ Thu, 21 Dec 2000 22:51:56 GMT
+
+
+ GTK_RELIEF_NORMAL
+
+ 0
+ 1
+ 1
+ 2
+ 5
+ 5
+ False
+ False
+ False
+ False
+ True
+ False
+
+
+
+
+ GtkEntry
+ fv_mother
+ True
+ False
+ True
+ 0
+
+
+ 1
+ 2
+ 1
+ 2
+ 5
+ 5
+ True
+ False
+ False
+ False
+ True
+ False
+
+
+
+
+ GtkButton
+ mother_next
+ Make the current mother the active person
+ True
+
+ clicked
+ on_mother_next_clicked
+ Sat, 21 Oct 2000 03:41:15 GMT
+
+ GTK_RELIEF_NORMAL
+
+ 2
+ 3
+ 1
+ 2
+ 5
+ 5
+ False
+ False
+ False
+ False
+ True
+ False
+
+
+
+ GtkArrow
+ arrow7
+ 10
+ 10
+ GTK_ARROW_RIGHT
+ GTK_SHADOW_OUT
+ 0.5
+ 0.5
+ 0
+ 0
+
+
+
+
+ GtkOptionMenu
+ childtype
+ True
+
+
+ 0
+
+ 1
+ 2
+ 2
+ 3
+ 5
+ 5
+ False
+ False
+ False
+ False
+ True
+ False
+
+
+
+
+
+ GtkHButtonBox
+ hbuttonbox23
+ GTK_BUTTONBOX_SPREAD
+ 30
+ 85
+ 27
+ 7
+ 0
+
+ 5
+ False
+ True
+
+
+
+ GtkButton
+ button109
+ True
+ True
+
+ clicked
+ on_choose_parents_clicked
+ Thu, 12 Jul 2001 23:24:52 GMT
+
+
+ GTK_RELIEF_NORMAL
+
+
+
+ GtkButton
+ button110
+ True
+ True
+
+ clicked
+ on_delete_parents_clicked
+ Thu, 12 Jul 2001 23:38:10 GMT
+
+
+ GTK_RELIEF_NORMAL
+
+
+
+
@@ -1587,8 +1742,8 @@
on_child_list_button_press_event
Thu, 21 Dec 2000 20:47:47 GMT
- 5
- 210,50,200,75,50
+ 6
+ 210,50,50,150,75,50
GTK_SELECTION_SINGLE
True
GTK_SHADOW_IN
@@ -1606,6 +1761,19 @@
0
+
+ GtkLabel
+ CList:title
+ glabel13
+
+ GTK_JUSTIFY_CENTER
+ False
+ 0.5
+ 0.5
+ 0
+ 0
+
+
GtkLabel
CList:title
@@ -2921,6 +3089,77 @@
+
+ GtkHBox
+ hbox24
+ False
+ 0
+
+ 8
+ True
+ True
+
+
+
+ GtkLabel
+ label223
+
+ GTK_JUSTIFY_CENTER
+ False
+ 0.5
+ 0.5
+ 5
+ 0
+
+ 5
+ False
+ False
+
+
+
+
+ GtkCombo
+ combo6
+ True
+ False
+ True
+ True
+ False
+ Birth
+Adopted
+Stepchild
+None
+Unknown
+
+
+ 5
+ True
+ True
+
+
+
+ GtkEntry
+ GtkCombo:entry
+ mrel
+ True
+ True
+ True
+ 0
+ Birth
+
+
+
+
+
+ GtkHSeparator
+ hseparator17
+
+ 10
+ True
+ True
+
+
+
GtkHBox
hbox7
@@ -3038,7 +3277,7 @@
GtkLabel
label186
-
+
GTK_JUSTIFY_CENTER
False
0.5
@@ -3053,24 +3292,35 @@
- GtkOptionMenu
- rtype
- True
-
- released
- on_rtype_clicked
- Tue, 30 Jan 2001 19:48:54 GMT
-
- Biological
+ GtkCombo
+ combo5
+ True
+ False
+ True
+ True
+ False
+ Birth
Adopted
-Other
+Stepchild
+None
+Unknown
- 0
5
- False
- False
+ True
+ True
+
+
+ GtkEntry
+ GtkCombo:entry
+ frel
+ True
+ True
+ True
+ 0
+ Birth
+
@@ -3202,16 +3452,16 @@ Other
GtkCList
addChild
- 350
- 100
+ 370
+ 200
True
select_row
on_addChild_select_row
Tue, 21 Nov 2000 21:52:56 GMT
- 2
- 198,80
+ 3
+ 200,80,40
GTK_SELECTION_SINGLE
True
GTK_SHADOW_IN
@@ -3241,6 +3491,19 @@ Other
0
0
+
+
+ GtkLabel
+ CList:title
+ glabel89
+
+ GTK_JUSTIFY_CENTER
+ False
+ 0.5
+ 0.5
+ 0
+ 0
+
@@ -3263,6 +3526,167 @@ Other
False
+
+
+ GtkTable
+ table21
+ 2
+ 2
+ False
+ 0
+ 0
+
+ 0
+ True
+ True
+
+
+
+ GtkLabel
+ label220
+
+ GTK_JUSTIFY_CENTER
+ False
+ 1
+ 0.5
+ 5
+ 5
+
+ 0
+ 1
+ 0
+ 1
+ 5
+ 5
+ False
+ False
+ False
+ False
+ True
+ False
+
+
+
+
+ GtkHBox
+ hbox23
+ True
+ 0
+
+ 1
+ 2
+ 0
+ 1
+ 5
+ 0
+ False
+ False
+ False
+ False
+ True
+ True
+
+
+
+ GtkCombo
+ combo3
+ True
+ False
+ True
+ True
+ False
+ Birth
+Adopted
+Stepchild
+None
+Unknown
+
+
+ 0
+ False
+ True
+
+
+
+ GtkEntry
+ GtkCombo:entry
+ mrel
+ True
+ True
+ True
+ 0
+ Birth
+
+
+
+
+
+ GtkLabel
+ label222
+
+ GTK_JUSTIFY_CENTER
+ False
+ 1
+ 0.5
+ 5
+ 5
+
+ 0
+ 1
+ 1
+ 2
+ 5
+ 5
+ False
+ False
+ False
+ False
+ True
+ False
+
+
+
+
+ GtkCombo
+ combo4
+ True
+ False
+ True
+ True
+ False
+ Birth
+Adopted
+Stepchild
+None
+Unknown
+
+
+ 1
+ 2
+ 1
+ 2
+ 5
+ 5
+ True
+ False
+ False
+ False
+ True
+ False
+
+
+
+ GtkEntry
+ GtkCombo:entry
+ frel
+ True
+ True
+ True
+ 0
+ Birth
+
+
+
@@ -4535,7 +4959,7 @@ Other
GtkTable
table20
- 4
+ 5
2
False
0
@@ -4546,32 +4970,6 @@ Other
True
-
- GtkLabel
- label189
-
- GTK_JUSTIFY_CENTER
- False
- 0.5
- 0.5
- 5
- 5
-
- 0
- 1
- 0
- 1
- 5
- 5
- False
- False
- False
- False
- False
- False
-
-
-
GtkLabel
label190
@@ -4627,7 +5025,7 @@ Other
GtkLabel
label192
-
+
GTK_JUSTIFY_CENTER
False
1
@@ -4739,7 +5137,7 @@ Other
radiobutton2
True
- False
+ True
True
childGender
@@ -4771,33 +5169,128 @@ Other
- GtkRadioButton
- childStatus
- True
-
- False
- True
- childStatus
+ GtkCombo
+ combo1
+ True
+ False
+ True
+ True
+ False
+ Birth
+Adopted
+Stepchild
+None
+Unknown
+
0
False
True
+
+
+ GtkEntry
+ GtkCombo:entry
+ mrel
+ True
+ True
+ True
+ 0
+ Birth
+
+
+
+
+ GtkLabel
+ label189
+
+ GTK_JUSTIFY_CENTER
+ False
+ 1
+ 0.5
+ 5
+ 5
+
+ 0
+ 1
+ 0
+ 1
+ 5
+ 5
+ False
+ False
+ False
+ False
+ True
+ False
+
+
+
+
+ GtkLabel
+ label217
+
+ GTK_JUSTIFY_CENTER
+ False
+ 1
+ 0.5
+ 5
+ 5
+
+ 0
+ 1
+ 4
+ 5
+ 5
+ 5
+ False
+ False
+ False
+ False
+ True
+ False
+
+
+
+
+ GtkCombo
+ combo2
+ True
+ False
+ True
+ True
+ False
+ Birth
+Adopted
+Stepchild
+None
+Unknown
+
+
+ 1
+ 2
+ 4
+ 5
+ 5
+ 5
+ True
+ False
+ False
+ False
+ True
+ False
+
- GtkRadioButton
- radiobutton4
+ GtkEntry
+ GtkCombo:entry
+ frel
True
-
- False
- True
- childStatus
-
- 0
- False
- True
-
+ True
+ True
+ 0
+ Birth
diff --git a/src/gramps_main.py b/src/gramps_main.py
index 4c73b0d7e..db078e944 100755
--- a/src/gramps_main.py
+++ b/src/gramps_main.py
@@ -148,6 +148,11 @@ def deathday(person):
else:
return ""
+#-------------------------------------------------------------------------
+#
+#
+#
+#-------------------------------------------------------------------------
def delete_event(widget, event):
widget.hide()
if utils.wasModified():
@@ -217,42 +222,15 @@ def on_remove_child_clicked(obj):
utils.modified()
load_family()
-#-------------------------------------------------------------------------
-#
-# Called when the user selects the edit marriage button on the family
-# page.
-#
-#-------------------------------------------------------------------------
-def on_edit_marriage_clicked(obj):
- global queryTop
-
- if not active_family:
- add_spouse()
- return
+def on_add_sp_clicked(obj):
+ add_spouse()
- queryTop = libglade.GladeXML(const.gladeFile,"marriageQuery")
+def on_edit_sp_clicked(obj):
+ marriage_edit(active_family)
+
+def on_delete_sp_clicked(obj):
+ delete_spouse()
- queryTop.signal_autoconnect({
- "on_marriageQuery_clicked" : on_marriageQuery_clicked,
- "destroy_passed_object" : utils.destroy_passed_object
- })
- marriageQuery = queryTop.get_widget("marriageQuery")
- marriageQuery.show()
-
-#-------------------------------------------------------------------------
-#
-#
-#
-#-------------------------------------------------------------------------
-def on_marriageQuery_clicked(obj):
- if queryTop.get_widget("addSpouse").get_active():
- add_spouse()
- elif queryTop.get_widget("editMarriage").get_active():
- marriage_edit(active_family)
- else:
- delete_spouse()
- utils.destroy_passed_object(obj)
-
#-------------------------------------------------------------------------
#
#
@@ -261,6 +239,7 @@ def on_marriageQuery_clicked(obj):
def on_add_child_clicked(obj):
global select_child
global addChildList
+ global childWindow
select_child = None
@@ -275,7 +254,8 @@ def on_add_child_clicked(obj):
selectChild = childWindow.get_widget("selectChild")
addChildList = childWindow.get_widget("addChild")
- redraw_child_list(1)
+ addChildList.set_column_visibility(1,Config.id_visible)
+ redraw_child_list(2)
selectChild.show()
#-------------------------------------------------------------------------
@@ -292,7 +272,8 @@ def redraw_child_list(filter):
for person in person_list:
if filter and person.getMainFamily() != None:
continue
- addChildList.append([utils.phonebook_name(person),birthday(person)])
+ addChildList.append([utils.phonebook_name(person),birthday(person),\
+ str(person.getId())])
addChildList.set_row_data(index,person)
index = index + 1
@@ -363,10 +344,13 @@ def on_addchild_ok_clicked(obj):
active_family.setMother(active_person)
active_person.addFamily(active_family)
- if newChildWindow.get_widget("childStatus").get_active():
+ mrel = const.childRelations[newChildWindow.get_widget("mrel").get_text()]
+ frel = const.childRelations[newChildWindow.get_widget("frel").get_text()]
+
+ if mrel == "Birth" and frel == "Birth":
person.setMainFamily(active_family)
else:
- person.addAltFamily(active_family,"Adopted")
+ person.addAltFamily(active_family,mrel,frel)
active_family.addChild(person)
@@ -397,12 +381,18 @@ def on_save_child_clicked(obj):
active_family.setMother(active_person)
active_family.addChild(select_child)
- family = select_child.getMainFamily()
-
- if family != None:
- family.removeChild(select_child)
- select_child.setMainFamily(active_family)
+ mrel = const.childRelations[childWindow.get_widget("mrel").get_text()]
+ frel = const.childRelations[childWindow.get_widget("frel").get_text()]
+
+ if mrel == "Birth" and frel == "Birth":
+ family = select_child.getMainFamily()
+ if family != None and family != active_family:
+ family.removeChild(select_child)
+
+ select_child.setMainFamily(active_family)
+ else:
+ select_child.addAltFamily(active_family,mrel,frel)
utils.modified()
utils.destroy_passed_object(obj)
@@ -427,37 +417,6 @@ def get_option_index(obj):
#
#
#-------------------------------------------------------------------------
-def on_rtype_clicked(obj,a):
- global family_window
-
- active_item = obj.get_active()
-
- index = get_option_index(obj)
- type = const.childRelations[index]
-
- select_father = None
- select_mother = None
-
- if type == "Birth":
- fam = active_person.getMainFamily()
- if fam:
- select_father = fam.getFather()
- select_mother = fam.getMother()
- else:
- for fam in active_person.getAltFamilyList():
- if fam[1] == type:
- select_father = fam[0].getFather()
- select_mother = fam[0].getMother()
-
- family_window.get_widget("fatherName").set_text(Config.nameof(select_father))
- family_window.get_widget("motherName").set_text(Config.nameof(select_mother))
-
-#-------------------------------------------------------------------------
-#
-#
-#
-#-------------------------------------------------------------------------
-
def on_choose_parents_clicked(obj):
global select_mother
global select_father
@@ -474,7 +433,6 @@ def on_choose_parents_clicked(obj):
family_window.signal_autoconnect({
"on_motherList_select_row" : on_motherList_select_row,
"on_fatherList_select_row" : on_fatherList_select_row,
- "on_rtype_clicked" : on_rtype_clicked,
"on_save_parents_clicked" : on_save_parents_clicked,
"destroy_passed_object" : utils.destroy_passed_object
})
@@ -497,21 +455,18 @@ def on_choose_parents_clicked(obj):
motherName.set_text(Config.nameof(select_mother))
motherList.set_data("mother_text",motherName)
- menu = family_window.get_widget("rtype")
-
if active_parents == active_person.getMainFamily():
- menu.set_history(0)
+ family_window.get_widget("mrel").set_text(_("Birth"))
+ family_window.get_widget("frel").set_text(_("Birth"))
else:
- for fam in active_person.getAltFamilyList():
- if active_parents == fam[0]:
- type = fam[1]
+ for f in active_person.getAltFamilyList():
+ if f[0] == active_parents:
+ family_window.get_widget("mrel").set_text(_(f[1]))
+ family_window.get_widget("frel").set_text(_(f[2]))
break
- if type == "Adopted":
- menu.set_history(1)
else:
- menu.set_history(2)
-
- menu.get_menu().connect("deactivate",on_rtype_clicked,None)
+ family_window.get_widget("mrel").set_text(_("Unknown"))
+ family_window.get_widget("frel").set_text(_("Unknown"))
people = database.getPersonMap().values()
people.sort(sort.by_last_name)
@@ -530,7 +485,7 @@ def on_choose_parents_clicked(obj):
mother_index = mother_index + 1
familyDialog.show()
-
+
#-------------------------------------------------------------------------
#
#
@@ -559,6 +514,8 @@ def new_database_response(val):
const.marriageEvents = const.initialize_marriage_event_list()
const.familyAttributes = const.initialize_family_attribute_list()
const.familyRelations = const.initialize_family_relation_list()
+ const.places = []
+
database.new()
topWindow.set_title("Gramps")
active_person = None
@@ -591,7 +548,9 @@ def marriage_edit(family):
#-------------------------------------------------------------------------
def full_update():
gtop.get_widget(NOTEBOOK).set_show_tabs(Config.usetabs)
- gtop.get_widget("child_list").set_column_visibility(4,Config.show_detail)
+ clist = gtop.get_widget("child_list")
+ clist.set_column_visibility(4,Config.show_detail)
+ clist.set_column_visibility(1,Config.id_visible)
apply_filter()
load_family()
load_sources()
@@ -872,22 +831,24 @@ def find_family(father,mother):
#
#
#-------------------------------------------------------------------------
-def change_family_type(family,type):
+def change_family_type(family,mrel,frel):
+ is_main = mrel == "Birth" and frel == "Birth"
+
if not family:
- if type == "Birth":
+ if is_main:
main = active_person.getMainFamily()
if main:
main.removeChild(active_person)
active_person.setMainFamily(None)
else:
for fam in active_person.getAltFamilyList():
- if fam[1] == type:
+ if is_main:
active_person.removeAltFamily(fam[0])
fam.removeChild(active_person)
return
elif family == active_person.getMainFamily():
- if type != "Birth":
+ if is_main:
utils.modified()
active_person.setMainFamily(None)
found = 0
@@ -903,21 +864,18 @@ def change_family_type(family,type):
else:
for fam in active_person.getAltFamilyList():
if family == fam[0]:
- if type == "Birth":
+ if is_main:
active_person.setMainFamily(family)
active_person.removeAltFamily(family)
utils.modified()
return
- if type != fam[1]:
- fam[1] = type
+ if mrel != fam[1] or frel != fam[2]:
+ active_person.removeAltFamily(family)
+ active_person.addAltFamily(family,mrel,frel)
utils.modified()
return
- if type == fam[1]:
- active_person.removeAltFamily(fam[0])
- fam[0].removeChild(active_person)
- active_person.addAltFamily(family,type)
- family.addChild(active_person)
- utils.modified()
+ active_person.addAltFamily(family,mrel,frel)
+ utils.modified()
#-------------------------------------------------------------------------
#
@@ -934,21 +892,10 @@ def on_save_parents_clicked(obj):
else:
family = None
- index = get_option_index(family_window.get_widget("rtype").get_menu())
- type = const.childRelations[index]
+ mrel = family_window.get_widget("mrel").get_text()
+ frel = family_window.get_widget("frel").get_text()
- if family != active_family:
- utils.modified()
- if index == 0:
- active_person.setMainFamily(family)
- if family:
- family.addChild(active_person)
- else:
- active_person.addAltFamily(family,type)
- if family:
- family.addChild(active_person)
- else:
- change_family_type(family,type)
+ change_family_type(family,mrel,frel)
active_mother = select_mother
active_father = select_father
@@ -1125,6 +1072,23 @@ def add_spouse():
spouseList.set_row_data(index,person)
index = index + 1
+#-------------------------------------------------------------------------
+#
+#
+#
+#-------------------------------------------------------------------------
+def on_delete_parents_clicked(obj):
+ if not active_parents:
+ return
+
+ active_parents.removeChild(active_person)
+
+ if active_parents == active_person.getMainFamily():
+ active_person.setMainFamily(None)
+ else:
+ active_person.removeAltFamily(active_parents)
+ load_family()
+
#-------------------------------------------------------------------------
#
#
@@ -1369,6 +1333,7 @@ def on_revert_activate(obj):
#-------------------------------------------------------------------------
def revert_query(value):
if value == 0:
+ const.places = []
const.personalEvents = const.initialize_personal_event_list()
const.personalAttributes = const.initialize_personal_attribute_list()
const.marriageEvents = const.initialize_marriage_event_list()
@@ -1663,7 +1628,7 @@ def load_family():
menuitem.show()
typeMenu.append(menuitem)
for fam in family_types:
- menuitem = GtkMenuItem(fam[1])
+ menuitem = GtkMenuItem("%s/%s" % (fam[2],fam[1]))
menuitem.set_data("parents",fam[0])
menuitem.connect("activate",on_current_type_changed)
menuitem.show()
@@ -1698,6 +1663,8 @@ def load_family():
gtop.get_widget("fv_spouse").set_menu(myMenu)
gtop.get_widget("lab_or_list").set_page(1)
+ gtop.get_widget("edit_sp").set_sensitive(1)
+ gtop.get_widget("delete_sp").set_sensitive(1)
elif number_of_families == 1:
gtop.get_widget("lab_or_list").set_page(0)
family = active_person.getFamilyList()[0]
@@ -1710,6 +1677,8 @@ def load_family():
fv_spouse1.set_text(Config.nameof(spouse))
fv_spouse1.set_data("person",spouse)
fv_spouse1.set_data("family",active_person.getFamilyList()[0])
+ gtop.get_widget("edit_sp").set_sensitive(1)
+ gtop.get_widget("delete_sp").set_sensitive(1)
else:
gtop.get_widget("lab_or_list").set_page(0)
gtop.get_widget("fv_spouse1").set_text("")
@@ -1717,6 +1686,9 @@ def load_family():
fv_spouse1.set_text("")
fv_spouse1.set_data("person",None)
fv_spouse1.set_data("family",None)
+ active_spouse = None
+ gtop.get_widget("edit_sp").set_sensitive(0)
+ gtop.get_widget("delete_sp").set_sensitive(0)
if number_of_families > 0:
display_marriage(active_person.getFamilyList()[0])
@@ -1859,17 +1831,17 @@ def display_marriage(family):
child_list.sort(sort.by_birthdate)
attr = ""
for child in child_list:
- status = "unknown"
+ status = _("unknown")
if child.getGender():
gender = const.male
else:
gender = const.female
if child.getMainFamily() == family:
- status = "Natural"
+ status = _("Birth")
else:
for fam in child.getAltFamilyList():
if fam[0] == family:
- status = fam[1]
+ status = "%s/%s" % (fam[2],fam[1])
if Config.show_detail:
attr = ""
@@ -1887,7 +1859,8 @@ def display_marriage(family):
if len(child.getPhotoList()) > 0:
attr = attr + "P"
- clist.append([Config.nameof(child),gender,birthday(child),status,attr])
+ clist.append([Config.nameof(child),str(child.getId()),\
+ gender,birthday(child),status,attr])
clist.set_row_data(i,child)
i=i+1
if i != 0:
@@ -1939,6 +1912,9 @@ def load_database(name):
if ntype not in const.personalEvents:
const.personalEvents.append(ntype)
+ const.places = database.getPlaces()
+ const.places.sort()
+
mylist = database.getFamilyEventTypes()
for type in mylist:
ntype = const.display_fevent(type)
@@ -2019,6 +1995,8 @@ def apply_filter():
datacomp = DataFilter.compare
clistadd = color_clist.add_with_data
gname = utils.phonebook_from_name
+
+ person_list.set_column_visibility(1,Config.id_visible)
for name_tuple in names:
person = name_tuple[1]
@@ -2031,8 +2009,10 @@ def apply_filter():
gender = const.male
else:
gender = const.female
- clistadd([gname(name,alt),gender,person.getBirth().getQuoteDate(),\
- person.getDeath().getQuoteDate()],person)
+ bday = person.getBirth().getQuoteDate()
+ dday = person.getDeath().getQuoteDate()
+ clistadd([gname(name,alt),str(person.getId()), gender,bday, dday],\
+ person)
i = i + 1
person_list.thaw()
@@ -2233,6 +2213,7 @@ def main(arg):
"on_child_list_button_press_event" : on_child_list_button_press_event,
"on_child_list_select_row" : on_child_list_select_row,
"on_fv_prev_clicked" : on_fv_prev_clicked,
+ "on_delete_parents_clicked" : on_delete_parents_clicked,
"on_contents_activate" : on_contents_activate,
"on_choose_parents_clicked" : on_choose_parents_clicked,
"on_spouselist_changed" : on_spouselist_changed,
@@ -2247,7 +2228,9 @@ def main(arg):
"on_save_activate" : on_save_activate,
"on_revert_activate" : on_revert_activate,
"on_add_child_clicked" : on_add_child_clicked,
- "on_edit_marriage_clicked" : on_edit_marriage_clicked,
+ "on_edit_sp_clicked" : on_edit_sp_clicked,
+ "on_add_sp_clicked" : on_add_sp_clicked,
+ "on_delete_sp_clicked" : on_delete_sp_clicked,
"on_remove_child_clicked" : on_remove_child_clicked,
"on_new_clicked" : on_new_clicked,
"on_add_bookmark_activate" : on_add_bookmark_activate,
@@ -2273,6 +2256,7 @@ def main(arg):
database = RelDataBase()
Config.loadConfig(full_update)
+ person_list.set_column_visibility(1,Config.id_visible)
gtop.get_widget(NOTEBOOK).set_show_tabs(Config.usetabs)
gtop.get_widget("child_list").set_column_visibility(4,Config.show_detail)
diff --git a/src/plugins/ReadGedcom.py b/src/plugins/ReadGedcom.py
index 9e143bd41..39794a784 100644
--- a/src/plugins/ReadGedcom.py
+++ b/src/plugins/ReadGedcom.py
@@ -52,7 +52,6 @@ photo_types = [ "jpeg", "bmp", "pict", "pntg", "tpic", "png", "gif",
_ADDRX = [ "ADDR", "ADR1", "ADR2" ]
-
ged2rel = {}
for val in const.personalConstantEvents.keys():
key = const.personalConstantEvents[val]
@@ -439,19 +438,20 @@ class GedcomParser:
#
#---------------------------------------------------------------------
def parse_ftw_relations(self,level):
- retval = ""
+ mrel = "Birth"
+ frel = "Birth"
while 1:
matches = self.get_next()
if int(matches[0]) < level:
self.backup()
- return retval
+ return (mrel,frel)
elif matches[1] == "_FREL":
if string.lower(matches[2]) != "natural":
- retval = matches[2]
+ frel = string.capitalize(matches[2])
elif matches[1] == "_MREL":
if string.lower(matches[2]) != "natural":
- retval = matches[2]
+ mrel = matches[2]
else:
self.barf(level+1)
@@ -479,13 +479,13 @@ class GedcomParser:
self.addr.setStreet(matches[2] + self.parse_continue_data(2))
self.parse_address(self.addr,2)
elif matches[1] == "CHIL":
- type = self.parse_ftw_relations(2)
+ mrel,frel = self.parse_ftw_relations(2)
child = self.db.findPerson(matches[2],self.pmap)
self.family.addChild(child)
if type != "":
if child.getMainFamily() == self.family:
child.setMainFamily(None)
- child.addAltFamily(self.family,type)
+ child.addAltFamily(self.family,mrel,frel)
elif matches[1] == "NCHI" or matches[1] == "RIN" or matches[1] == "SUBM":
pass
elif matches[1] == "REFN" or matches[1] == "CHAN":
@@ -601,9 +601,9 @@ class GedcomParser:
if self.person.getMainFamily() == None:
self.person.setMainFamily(family)
else:
- self.person.addAltFamily(family,"unknown")
+ self.person.addAltFamily(family,"Unknown","Unknown")
else:
- self.person.addAltFamily(family,type)
+ self.person.addAltFamily(family,type,type)
elif matches[1] == "RESI":
addr = Address()
self.person.addAddress(addr)
@@ -690,7 +690,7 @@ class GedcomParser:
self.backup()
return (string.capitalize(type),note)
elif matches[1] == "PEDI":
- type = matches[2]
+ type = string.capitalize(matches[2])
elif matches[1] == "_PRIMARY":
type = matches[1]
elif matches[1] == "NOTE":
@@ -734,7 +734,8 @@ class GedcomParser:
elif form in photo_types:
path = find_file(file,self.dir_path)
if path == "":
- self.warn(_("Could not import %s: either the file could not be found, or it was not a valid image") % file + "\n")
+ self.warn(_("Could not import %s: either the file could not be found, or it was not a valid image")\
+ % file + "\n")
else:
photo = Photo()
photo.setPath(path)
@@ -917,7 +918,8 @@ class GedcomParser:
if event.getName() == "Birth":
self.person.setMainFamily(family)
else:
- self.person.addAltFamily(family,event.getName())
+ type = string.capitalize(event.getName())
+ self.person.addAltFamily(family,type,type)
self.ignore_sub_junk(level+1)
elif matches[1] == "PLAC":
event.setPlace(matches[2])
diff --git a/src/plugins/Summary.py b/src/plugins/Summary.py
index dae03277b..2149f59b2 100644
--- a/src/plugins/Summary.py
+++ b/src/plugins/Summary.py
@@ -97,7 +97,8 @@ def report(database,person):
text = text + "----------------------------\n"
text = text + "%s : %d\n" % (_("Individuals with images"),with_photos)
text = text + "%s : %d\n" % (_("Total number of images"),total_photos)
- text = text + "%s : %d %s\n" % (_("Total size of images"),bytes,_("bytes"))
+ text = text + "%s : %d %s\n" % (_("Total size of images"),bytes,\
+ _("bytes"))
text = text + "\n%s\n" % _("Family Information")
text = text + "----------------------------\n"
text = text + "%s : %d\n" % (_("Number of families"),len(familyList))
diff --git a/src/plugins/WebPage.py b/src/plugins/WebPage.py
index 6a5b000c7..a9f521bc7 100644
--- a/src/plugins/WebPage.py
+++ b/src/plugins/WebPage.py
@@ -238,9 +238,11 @@ class IndividualPage:
self.doc.start_table("one","IndTable")
self.write_normal_row("%s:" % _("Name"), name, name_obj.getSourceRef())
if self.person.getGender() == Person.male:
- self.write_normal_row("%s:" % _("Gender"), _("Male"),None)
+ self.write_normal_row("%s:" % _("Gender"), \
+ _("Male"),None)
else:
- self.write_normal_row("%s:" % _("Gender"), _("Female"),None)
+ self.write_normal_row("%s:" % _("Gender"), \
+ _("Female"),None)
family = self.person.getMainFamily()
if family: