Better support for same sex parents and support for double clicking in the pedegree view

svn: r250
This commit is contained in:
Don Allingham 2001-07-15 21:28:31 +00:00
parent 403d4e2b40
commit ba8f365e04
5 changed files with 312 additions and 75 deletions

View File

@ -6,6 +6,9 @@ Version 0.4.0
* gramps ID can be displayed in many lists
* Multiple selection in Add Children box
* Internal gramps ID now a string instead of an integer
* Double clicking on a name in the Pedegree view brings up the edit
box for that person
* Support for same sex parent families has been added
Version 0.3.2
* Fixed Style Editor on WebPage.py, to allow styles to be edited.

View File

@ -1914,6 +1914,11 @@
<class>GtkEntry</class>
<name>pv4</name>
<can_focus>True</can_focus>
<signal>
<name>button_press_event</name>
<handler>on_pv_button_press_event</handler>
<last_modification_time>Sun, 15 Jul 2001 21:18:50 GMT</last_modification_time>
</signal>
<editable>False</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
@ -1938,6 +1943,11 @@
<class>GtkEntry</class>
<name>pv5</name>
<can_focus>True</can_focus>
<signal>
<name>button_press_event</name>
<handler>on_pv_button_press_event</handler>
<last_modification_time>Sun, 15 Jul 2001 21:19:01 GMT</last_modification_time>
</signal>
<editable>False</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
@ -1962,6 +1972,11 @@
<class>GtkEntry</class>
<name>pv6</name>
<can_focus>True</can_focus>
<signal>
<name>button_press_event</name>
<handler>on_pv_button_press_event</handler>
<last_modification_time>Sun, 15 Jul 2001 21:19:10 GMT</last_modification_time>
</signal>
<editable>False</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
@ -1986,6 +2001,11 @@
<class>GtkEntry</class>
<name>pv7</name>
<can_focus>True</can_focus>
<signal>
<name>button_press_event</name>
<handler>on_pv_button_press_event</handler>
<last_modification_time>Sun, 15 Jul 2001 21:19:20 GMT</last_modification_time>
</signal>
<editable>False</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
@ -2010,6 +2030,11 @@
<class>GtkEntry</class>
<name>pv2</name>
<can_focus>True</can_focus>
<signal>
<name>button_press_event</name>
<handler>on_pv_button_press_event</handler>
<last_modification_time>Sun, 15 Jul 2001 21:18:28 GMT</last_modification_time>
</signal>
<editable>False</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
@ -2034,6 +2059,11 @@
<class>GtkEntry</class>
<name>pv3</name>
<can_focus>True</can_focus>
<signal>
<name>button_press_event</name>
<handler>on_pv_button_press_event</handler>
<last_modification_time>Sun, 15 Jul 2001 21:18:38 GMT</last_modification_time>
</signal>
<editable>False</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
@ -2058,6 +2088,11 @@
<class>GtkEntry</class>
<name>pv1</name>
<can_focus>True</can_focus>
<signal>
<name>button_press_event</name>
<handler>on_pv_button_press_event</handler>
<last_modification_time>Sun, 15 Jul 2001 21:18:18 GMT</last_modification_time>
</signal>
<editable>False</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
@ -2082,6 +2117,11 @@
<class>GtkEntry</class>
<name>pv8</name>
<can_focus>True</can_focus>
<signal>
<name>button_press_event</name>
<handler>on_pv_button_press_event</handler>
<last_modification_time>Sun, 15 Jul 2001 21:19:30 GMT</last_modification_time>
</signal>
<editable>False</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
@ -2106,6 +2146,11 @@
<class>GtkEntry</class>
<name>pv9</name>
<can_focus>True</can_focus>
<signal>
<name>button_press_event</name>
<handler>on_pv_button_press_event</handler>
<last_modification_time>Sun, 15 Jul 2001 21:19:57 GMT</last_modification_time>
</signal>
<editable>False</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
@ -2130,6 +2175,11 @@
<class>GtkEntry</class>
<name>pv10</name>
<can_focus>True</can_focus>
<signal>
<name>button_press_event</name>
<handler>on_pv_button_press_event</handler>
<last_modification_time>Sun, 15 Jul 2001 21:20:19 GMT</last_modification_time>
</signal>
<editable>False</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
@ -2154,6 +2204,11 @@
<class>GtkEntry</class>
<name>pv11</name>
<can_focus>True</can_focus>
<signal>
<name>button_press_event</name>
<handler>on_pv_button_press_event</handler>
<last_modification_time>Sun, 15 Jul 2001 21:20:28 GMT</last_modification_time>
</signal>
<editable>False</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
@ -2178,6 +2233,11 @@
<class>GtkEntry</class>
<name>pv12</name>
<can_focus>True</can_focus>
<signal>
<name>button_press_event</name>
<handler>on_pv_button_press_event</handler>
<last_modification_time>Sun, 15 Jul 2001 21:20:36 GMT</last_modification_time>
</signal>
<editable>False</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
@ -2202,6 +2262,11 @@
<class>GtkEntry</class>
<name>pv13</name>
<can_focus>True</can_focus>
<signal>
<name>button_press_event</name>
<handler>on_pv_button_press_event</handler>
<last_modification_time>Sun, 15 Jul 2001 21:20:49 GMT</last_modification_time>
</signal>
<editable>False</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
@ -2226,6 +2291,11 @@
<class>GtkEntry</class>
<name>pv14</name>
<can_focus>True</can_focus>
<signal>
<name>button_press_event</name>
<handler>on_pv_button_press_event</handler>
<last_modification_time>Sun, 15 Jul 2001 21:21:00 GMT</last_modification_time>
</signal>
<editable>False</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
@ -2250,6 +2320,11 @@
<class>GtkEntry</class>
<name>pv15</name>
<can_focus>True</can_focus>
<signal>
<name>button_press_event</name>
<handler>on_pv_button_press_event</handler>
<last_modification_time>Sun, 15 Jul 2001 21:21:09 GMT</last_modification_time>
</signal>
<editable>False</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
@ -3073,7 +3148,7 @@
<widget>
<class>GtkLabel</class>
<name>label80</name>
<name>mlabel</name>
<width>100</width>
<label>Mother</label>
<justify>GTK_JUSTIFY_CENTER</justify>
@ -3246,7 +3321,7 @@ Unknown
<widget>
<class>GtkLabel</class>
<name>label83</name>
<name>flabel</name>
<width>100</width>
<label>Father</label>
<justify>GTK_JUSTIFY_CENTER</justify>
@ -3396,6 +3471,77 @@ Unknown
</widget>
</widget>
</widget>
<widget>
<class>GtkHSeparator</class>
<name>hseparator19</name>
<child>
<padding>10</padding>
<expand>True</expand>
<fill>True</fill>
</child>
</widget>
<widget>
<class>GtkHBox</class>
<name>hbox30</name>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkLabel</class>
<name>label229</name>
<label>Parent Relationship</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<padding>5</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkCombo</class>
<name>prel_combo</name>
<value_in_list>True</value_in_list>
<ok_if_empty>True</ok_if_empty>
<case_sensitive>False</case_sensitive>
<use_arrows>True</use_arrows>
<use_arrows_always>False</use_arrows_always>
<items></items>
<child>
<padding>5</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkEntry</class>
<child_name>GtkCombo:entry</child_name>
<name>prel</name>
<can_focus>True</can_focus>
<signal>
<name>changed</name>
<handler>on_prel_changed</handler>
<last_modification_time>Sun, 15 Jul 2001 14:33:47 GMT</last_modification_time>
</signal>
<editable>False</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
<text></text>
</widget>
</widget>
</widget>
</widget>
</widget>
</widget>

View File

@ -222,12 +222,27 @@ def on_remove_child_clicked(obj):
utils.modified()
load_family()
#-------------------------------------------------------------------------
#
#
#
#-------------------------------------------------------------------------
def on_add_sp_clicked(obj):
add_spouse()
#-------------------------------------------------------------------------
#
#
#
#-------------------------------------------------------------------------
def on_edit_sp_clicked(obj):
marriage_edit(active_family)
#-------------------------------------------------------------------------
#
#
#
#-------------------------------------------------------------------------
def on_delete_sp_clicked(obj):
delete_spouse()
@ -460,31 +475,8 @@ def on_choose_parents_clicked(obj):
select_father = None
family_window = libglade.GladeXML(const.gladeFile,"familyDialog")
family_window.signal_autoconnect({
"on_motherList_select_row" : on_motherList_select_row,
"on_fatherList_select_row" : on_fatherList_select_row,
"on_save_parents_clicked" : on_save_parents_clicked,
"destroy_passed_object" : utils.destroy_passed_object
})
familyDialog = family_window.get_widget("familyDialog")
fatherList = family_window.get_widget("fatherList")
fatherList.append(["unknown",""])
fatherList.set_row_data(0,None)
fatherName = family_window.get_widget("fatherName")
fatherName.set_text(Config.nameof(select_father))
fatherList.set_data("father_text",fatherName)
motherList = family_window.get_widget("motherList")
motherList.append(["unknown",""])
motherList.set_row_data(0,None)
motherName = family_window.get_widget("motherName")
motherName.set_text(Config.nameof(select_mother))
motherList.set_data("mother_text",motherName)
if active_parents == active_person.getMainFamily():
family_window.get_widget("mrel").set_text(_("Birth"))
family_window.get_widget("frel").set_text(_("Birth"))
@ -498,6 +490,56 @@ def on_choose_parents_clicked(obj):
family_window.get_widget("mrel").set_text(_("Unknown"))
family_window.get_widget("frel").set_text(_("Unknown"))
fcombo = family_window.get_widget("prel_combo")
prel = family_window.get_widget("prel")
prel.set_data("o",family_window)
fcombo.set_popdown_strings(const.familyRelations)
family_window.signal_autoconnect({
"on_motherList_select_row" : on_motherList_select_row,
"on_fatherList_select_row" : on_fatherList_select_row,
"on_save_parents_clicked" : on_save_parents_clicked,
"on_prel_changed" : on_prel_changed,
"destroy_passed_object" : utils.destroy_passed_object
})
text = _("Choose the Parents of %s") % Config.nameof(active_person)
family_window.get_widget("chooseTitle").set_text(text)
prel.set_text(active_parents.getRelationship())
familyDialog.show()
#-------------------------------------------------------------------------
#
#
#
#-------------------------------------------------------------------------
def on_prel_changed(obj):
family_window = obj.get_data("o")
type = obj.get_text()
fatherName = family_window.get_widget("fatherName")
fatherName.set_text(Config.nameof(select_father))
motherName = family_window.get_widget("motherName")
motherName.set_text(Config.nameof(select_mother))
fatherList = family_window.get_widget("fatherList")
motherList = family_window.get_widget("motherList")
fatherList.freeze()
motherList.freeze()
fatherList.clear()
motherList.clear()
fatherList.append(["unknown",""])
fatherList.set_row_data(0,None)
fatherList.set_data("father_text",fatherName)
motherList.append(["unknown",""])
motherList.set_row_data(0,None)
motherList.set_data("mother_text",motherName)
people = database.getPersonMap().values()
people.sort(sort.by_last_name)
father_index = 1
@ -505,6 +547,13 @@ def on_choose_parents_clicked(obj):
for person in people:
if person == active_person:
continue
elif type == "Partners":
fatherList.append([utils.phonebook_name(person),birthday(person)])
fatherList.set_row_data(father_index,person)
father_index = father_index + 1
motherList.append([utils.phonebook_name(person),birthday(person)])
motherList.set_row_data(mother_index,person)
mother_index = mother_index + 1
elif person.getGender() == Person.male:
fatherList.append([utils.phonebook_name(person),birthday(person)])
fatherList.set_row_data(father_index,person)
@ -514,7 +563,15 @@ def on_choose_parents_clicked(obj):
motherList.set_row_data(mother_index,person)
mother_index = mother_index + 1
familyDialog.show()
if type == "Partners":
family_window.get_widget("mlabel").set_text(_("Parent"))
family_window.get_widget("flabel").set_text(_("Parent"))
else:
family_window.get_widget("mlabel").set_text(_("Mother"))
family_window.get_widget("flabel").set_text(_("Father"))
motherList.thaw()
fatherList.thaw()
#-------------------------------------------------------------------------
#
@ -890,7 +947,7 @@ def change_family_type(family,mrel,frel):
fam[0] = family
found = 1
if found == 0:
active_person.addAltFamily(family,type)
active_person.addAltFamily(family,mrel,frel)
else:
for fam in active_person.getAltFamilyList():
if family == fam[0]:
@ -917,13 +974,27 @@ def on_save_parents_clicked(obj):
global active_mother
global active_family
mrel = family_window.get_widget("mrel").get_text()
frel = family_window.get_widget("frel").get_text()
type = family_window.get_widget("prel").get_text()
if select_father or select_mother:
if select_mother.getGender() == Person.male and \
select_father.getGender() == Person.female:
x = select_mother
select_mother = select_father
select_father = x
type = "Unknown"
elif select_mother.getGender() != select_father.getGender():
if type == "Partners":
type = "Unknown"
else:
type = "Partners"
family = find_family(select_father,select_mother)
else:
family = None
mrel = family_window.get_widget("mrel").get_text()
frel = family_window.get_widget("frel").get_text()
family.setRelationship(type)
change_family_type(family,mrel,frel)
@ -1476,6 +1547,18 @@ def on_notebook1_switch_page(obj,junk,page):
elif page == 3:
load_sources()
#-------------------------------------------------------------------------
#
#
#
#-------------------------------------------------------------------------
def on_pv_button_press_event(obj,event):
if event.button == 1 and event.type == GDK._2BUTTON_PRESS:
person = obj.get_data("p")
if person == None:
return
load_person(person)
#-------------------------------------------------------------------------
#
#
@ -1706,16 +1789,6 @@ def load_family():
else:
gtop.get_widget("childtype").hide()
fn = _("Father")
mn = _("Mother")
if active_parents and active_parents.getRelationship() == "Partners":
fn = _("Parent")
mn = _("Parent")
gtop.get_widget("editFather").children()[0].set_text(fn)
gtop.get_widget("editMother").children()[0].set_text(mn)
change_parents(active_parents)
if active_person:
@ -1785,6 +1858,16 @@ def change_parents(family):
global active_father
global active_mother
fn = _("Father")
mn = _("Mother")
if active_parents and active_parents.getRelationship() == "Partners":
fn = _("Parent")
mn = _("Parent")
gtop.get_widget("editFather").children()[0].set_text(fn)
gtop.get_widget("editMother").children()[0].set_text(mn)
fv_father = gtop.get_widget("fv_father")
fv_mother = gtop.get_widget("fv_mother")
father_next = gtop.get_widget("father_next")
@ -1822,6 +1905,7 @@ def change_parents(family):
active_father = None
active_mother = None
#-------------------------------------------------------------------------
#
#
@ -1831,15 +1915,16 @@ def load_tree():
text = {}
tip = {}
for i in range(1,16):
text[i] = ""
text[i] = ("",None)
tip[i] = ""
load_tree_values(active_person,1,16,text,tip)
tips = GtkTooltips()
for i in range(1,16):
pv[i].set_text(text[i])
pv[i].set_text(text[i][0])
pv[i].set_position(0)
pv[i].set_data("p",text[i][1])
if tip[i] != "":
tips.set_tip(pv[i],tip[i])
@ -1864,18 +1949,20 @@ def load_tree():
def load_tree_values(person,index,max,pv_text,tip):
if person == None:
return
pv_text[index] = Config.nameof(person)
msg = Config.nameof(person)
bdate = person.getBirth().getDate()
ddate = person.getDeath().getDate()
if bdate and ddate:
text = pv_text[index] + "\nb. " + bdate + "\n" + "d. " + ddate
text = msg + "\nb. " + bdate + "\n" + "d. " + ddate
elif bdate and not ddate:
text = pv_text[index] + "\nb. " + bdate
text = msg + "\nb. " + bdate
elif not bdate and ddate:
text = pv_text[index] + "\nd. " + ddate
text = msg + "\nd. " + ddate
else:
text = pv_text[index]
text = msg
tip[index] = text
pv_text[index] = (msg,person)
if 2*index+1 < max:
family = person.getMainFamily()
if family != None:
@ -2321,6 +2408,7 @@ def main(arg):
"on_addperson_clicked" : on_addperson_clicked,
"on_delete_person_clicked" : on_delete_person_clicked,
"on_preferences_activate" : on_preferences_activate,
"on_pv_button_press_event" : on_pv_button_press_event,
"on_edit_bookmarks_activate" : on_edit_bookmarks_activate,
"on_edit_active_person" : on_edit_active_person,
"on_edit_spouse_clicked" : on_edit_spouse_clicked,

View File

@ -1,6 +1,6 @@
# French Translation for Gramps
# Gramps French translation
# Copyright (C) 2001 Free Software Foundation, Inc.
# Laurent Protois <laurent.protois@free.fr>, 201.
# Laurent Protois <laurent.protois@free.fr>, 2001.
#
msgid ""
msgstr ""
@ -34,32 +34,32 @@ msgstr "%P %%"
#: glade.c:1479
#, c-format
msgid "%d broken family images were found\n"
msgstr "%d Des liens avec des photos de familles ont été perdus\n"
msgstr "%d liens avec des photos de familles ont été perdus\n"
#: glade.c:1475
#, c-format
msgid "%d broken family links were found\n"
msgstr "%d Des liens familiaux ont été perdus\n"
msgstr "%d liens familiaux ont été perdus\n"
#: glade.c:1481
#, c-format
msgid "%d broken personal images were found\n"
msgstr "%d Des liens avec des photos individuelles ont été perdus\n"
msgstr "%d liens avec des photos individuelles ont été perdus\n"
#: glade.c:1477
#, c-format
msgid "%d empty families were found\n"
msgstr "%d Il existe des familles vides\n"
msgstr "%d familles vides sont présentes\n"
#: glade.c:1555
#, c-format
msgid "%d nicknames were extracted\n"
msgstr "%d Extraction de surnoms\n"
msgstr "%d surnoms ont été extraits\n"
#: glade.c:1557
#, c-format
msgid "%d titles were extracted"
msgstr "%d Extraction de titres"
msgstr "%d titres ont été extraits"
#: glade.c:1452
#, c-format
@ -70,37 +70,37 @@ msgstr "%s G
#: glade.c:1561
#, c-format
msgid "%s could not be opened\n"
msgstr "%s Ouverture impossible\n"
msgstr "%s ouverture impossible\n"
#: glade.c:1404 glade.c:1409
#, c-format
msgid "%s is a corrupt file"
msgstr "%s Fichier corrompu"
msgstr "%s fichier corrompu"
#: glade.c:1375 glade.c:1379
#, c-format
msgid "%s is not a directory"
msgstr "%s Ce n'est pas un répertoire"
msgstr "%s n'est pas un répertoire"
#: glade.c:1455
#, c-format
msgid "%s was born in the year %s in %s. "
msgstr "%s Né(e) en l'an %s à %s. "
msgstr "%s est né(e) en l'an %s à %s. "
#: glade.c:1456
#, c-format
msgid "%s was born in the year %s. "
msgstr "%s Né(e) en l'an %s. "
msgstr "%s est né(e) en l'an %s. "
#: glade.c:1453
#, c-format
msgid "%s was born on %s in %s. "
msgstr "%s Né(e) le %s à %s. "
msgstr "%s est né(e) le %s à %s. "
#: glade.c:1454
#, c-format
msgid "%s was born on %s. "
msgstr "%s Né(e) le %s. "
msgstr "%s est né(e) le %s. "
#: glade.c:19
msgid "(Recommended only for English)"
@ -164,7 +164,7 @@ msgstr "A4"
#: glade.c:1337 glade.c:1340 glade.c:1343 glade.c:1346
msgid "ABT"
msgstr "Env"
msgstr "Vers"
#: glade.c:1330 glade.c:1339 glade.c:1342 glade.c:1345 glade.c:1348
msgid "AFTER"
@ -344,11 +344,11 @@ msgstr "Avril"
#: glade.c:106
msgid "Attribute"
msgstr "Qualité"
msgstr "Attribut"
#: glade.c:109
msgid "Attributes"
msgstr "Qualités"
msgstr "Attributs"
#: glade.c:1298
msgid "August"
@ -634,11 +634,11 @@ msgid "DD. Month Year"
msgstr "JJ. Mois Années"
#: glade.c:1237
msgid "DD/MM/YYYY"
msgid "DD.MM.YYYY"
msgstr "JJ.MM.AAAA"
#: glade.c:1234
msgid "DD.MM.YYYY"
msgid "DD/MM/YYYY"
msgstr "JJ/MM/AAAA"
#: glade.c:1240
@ -896,7 +896,7 @@ msgstr "Dix-huiti
#: glade.c:1270
msgid "Elected"
msgstr "Elu"
msgstr "Election"
#: glade.c:1431
msgid "Eleventh"
@ -1055,7 +1055,7 @@ msgstr "Filtre"
#: glade.c:1421
msgid "First"
msgstr "Premier"
msgstr "Première"
#: glade.c:409 glade.c:1550
msgid "First Person"
@ -1425,7 +1425,7 @@ msgstr "Aide pas encore pr
#: glade.c:609
msgid "Home"
msgstr "Maison"
msgstr "de Cujus"
#: glade.c:612
msgid "Identification"
@ -1574,7 +1574,7 @@ msgstr "MOI Jour, Ann
#: glade.c:657
msgid "Make Primary"
msgstr "Make Primary"
msgstr "Mettre en premier"
#: glade.c:660
msgid "Make the active person the default person"
@ -1626,7 +1626,7 @@ msgstr "Publication du mariage"
#: glade.c:1252
msgid "Marriage Settlement"
msgstr "Célébration du mariage"
msgstr "Contrat de mariage"
#: glade.c:1527
msgid "Marriage date"
@ -2052,7 +2052,7 @@ msgstr "Information de publication"
#: glade.c:884
msgid "Qualifier"
msgstr "Qualification"
msgstr "Qualificatif"
#: glade.c:1368
msgid "RTF"
@ -2084,7 +2084,7 @@ msgstr "Editions"
#: glade.c:902
msgid "Researcher"
msgstr "Recherche"
msgstr "Chercheur"
#: glade.c:905
msgid "Researcher Information"
@ -2096,7 +2096,7 @@ msgstr "R
#: glade.c:908
msgid "Restrict data on living people"
msgstr "Restreindre au personne vivante"
msgstr "Restreindre les informations sur les personnes vivantes"
#: glade.c:911
msgid "Restrict information on living people"
@ -2184,7 +2184,7 @@ msgstr ""
#: glade.c:1422
msgid "Second"
msgstr "Second"
msgstr "Seconde"
#: glade.c:955 glade.c:1551
msgid "Second Person"