diff --git a/src/EditPerson.glade b/src/EditPerson.glade index c30051804..2b2832c17 100644 --- a/src/EditPerson.glade +++ b/src/EditPerson.glade @@ -1258,7 +1258,8 @@ GtkButton - button103 + name_source + Edit source information for the highlighted name True clicked @@ -1286,7 +1287,8 @@ GtkButton - button104 + name_note + Edit note information for the highlighted name True clicked @@ -1673,8 +1675,8 @@ GtkButton - button86 - Choose source information + event_source + Edit source information for the highlighted event True clicked @@ -1702,7 +1704,8 @@ GtkButton - edit_note + event_note + Edit note information for the highlighted event True clicked @@ -2072,8 +2075,8 @@ GtkButton - button95 - Choose source information + attr_source + Edit source information for the highlighted attribute True clicked @@ -2101,7 +2104,8 @@ GtkButton - button97 + attr_note + Edit note information for the highlighted attribute True clicked @@ -2598,8 +2602,8 @@ GtkButton - button91 - Choose source information + addr_source + Edit source information for the highlighted address True clicked @@ -2627,7 +2631,8 @@ GtkButton - button98 + addr_note + Edit note information for the highlighted address True clicked diff --git a/src/EditPerson.py b/src/EditPerson.py index bfcb70b78..7e94832b9 100644 --- a/src/EditPerson.py +++ b/src/EditPerson.py @@ -123,6 +123,14 @@ class EditPerson: self.dplace = self.get_widget("deathPlace") self.is_male = self.get_widget("genderMale") self.is_female = self.get_widget("genderFemale") + self.event_note = self.get_widget("event_note") + self.event_source = self.get_widget("event_source") + self.addr_note = self.get_widget("addr_note") + self.addr_source = self.get_widget("addr_source") + self.attr_note = self.get_widget("attr_note") + self.attr_source = self.get_widget("attr_source") + self.name_note = self.get_widget("name_note") + self.name_source = self.get_widget("name_source") self.selectedIcon = -1 @@ -295,6 +303,11 @@ class EditPerson: current_row = current_row - 1 self.name_list.select_row(current_row,0) self.name_list.moveto(current_row,0) + self.name_note.set_sensitive(1) + self.name_source.set_sensitive(1) + else: + self.name_note.set_sensitive(0) + self.name_source.set_sensitive(0) self.name_list.set_data(INDEX,current_row) self.name_list.thaw() @@ -356,6 +369,11 @@ class EditPerson: current_row = current_row - 1 self.attr_list.select_row(current_row,0) self.attr_list.moveto(current_row,0) + self.attr_note.set_sensitive(1) + self.attr_source.set_sensitive(1) + else: + self.attr_note.set_sensitive(0) + self.attr_source.set_sensitive(0) self.attr_list.set_data(INDEX,current_row) self.attr_list.thaw() @@ -391,6 +409,11 @@ class EditPerson: current_row = current_row - 1 self.address_list.select_row(current_row,0) self.address_list.moveto(current_row,0) + self.addr_note.set_sensitive(1) + self.addr_source.set_sensitive(1) + else: + self.addr_note.set_sensitive(0) + self.addr_source.set_sensitive(0) self.address_list.set_data(INDEX,current_row) self.address_list.thaw() @@ -426,6 +449,12 @@ class EditPerson: current_row = current_row - 1 self.event_list.select_row(current_row,0) self.event_list.moveto(current_row,0) + self.event_note.set_sensitive(1) + self.event_source.set_sensitive(1) + else: + self.event_note.set_sensitive(0) + self.event_source.set_sensitive(0) + self.event_list.set_data(INDEX,current_row) self.event_list.thaw() @@ -799,8 +828,8 @@ def on_event_add_clicked(obj): 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("dp_combo").set_popdown_strings(const.places) + edit_person_obj.get_widget("bp_combo").set_popdown_strings(const.places) edit_person_obj.get_widget("eventPlace_combo").set_popdown_strings(const.places) edit_person_obj.person.addEvent(event) diff --git a/src/Marriage.py b/src/Marriage.py index 8693d3261..410138592 100644 --- a/src/Marriage.py +++ b/src/Marriage.py @@ -279,7 +279,15 @@ def on_close_marriage_editor(obj): relation = family_obj.type_field.entry.get_text() if const.save_frel(relation) != family_obj.family.getRelationship(): - family_obj.family.setRelationship(const.save_frel(relation)) + father = family_obj.family.getFather() + mother = family_obj.family.getMother() + if father.getGender() == mother.getGender(): + family_obj.family.setRelationship("Partners") + else: + val = const.save_frel(relation) + if val == "Partners": + val = "Unknown" + family_obj.family.setRelationship(val) utils.modified() text = family_obj.notes_field.get_chars(0,-1) diff --git a/src/const.py b/src/const.py index 9c52f97a5..a34aa13ce 100644 --- a/src/const.py +++ b/src/const.py @@ -356,7 +356,7 @@ def save_fattr(st): _fr_e2l = { "Married" : _("Married"), - "Common Law" : _("Common Law"), + "Unmarried" : _("Unmarried"), "Partners" : _("Partners"), "Unknown" : _("Unknown") } diff --git a/src/gramps.glade b/src/gramps.glade index 2aad6490d..bceaf61e9 100644 --- a/src/gramps.glade +++ b/src/gramps.glade @@ -2752,13 +2752,15 @@ GtkVBox vbox11 + 400 + 400 False 0 GtkLabel spouseTitle - + GTK_JUSTIFY_CENTER False 0.5 @@ -2772,6 +2774,77 @@ + + GtkHSeparator + hseparator18 + + 10 + False + True + + + + + GtkHBox + hbox29 + False + 0 + + 0 + False + True + + + + GtkLabel + label228 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 10 + 10 + + 0 + False + False + + + + + GtkCombo + rel_combo + True + True + False + True + False + + + 10 + True + True + + + + GtkEntry + GtkCombo:entry + rel_type + True + + changed + on_rel_type_changed + Sat, 14 Jul 2001 15:29:20 GMT + + False + True + 0 + + + + + GtkScrolledWindow scrolledwindow9 @@ -2789,7 +2862,7 @@ GtkCList spouseList 350 - 200 + 400 True select_row @@ -3103,7 +3176,7 @@ GtkLabel label223 - + GTK_JUSTIFY_CENTER False 0.5 @@ -3277,7 +3350,7 @@ Unknown GtkLabel label186 - + GTK_JUSTIFY_CENTER False 0.5 @@ -3452,7 +3525,7 @@ Unknown GtkCList addChild - 370 + 450 200 True @@ -3466,7 +3539,7 @@ Unknown Sat, 14 Jul 2001 02:02:37 GMT 3 - 200,80,40 + 200,167,40 GTK_SELECTION_MULTIPLE True GTK_SHADOW_IN @@ -3548,7 +3621,7 @@ Unknown GtkLabel - label220 + mlabel GTK_JUSTIFY_CENTER False @@ -3627,7 +3700,7 @@ Unknown GtkLabel - label222 + flabel GTK_JUSTIFY_CENTER False @@ -5029,7 +5102,7 @@ Unknown GtkLabel - label192 + mlabel GTK_JUSTIFY_CENTER False @@ -5234,7 +5307,7 @@ Unknown GtkLabel - label217 + flabel GTK_JUSTIFY_CENTER False diff --git a/src/gramps_main.py b/src/gramps_main.py index b292b705a..dbd1b0711 100755 --- a/src/gramps_main.py +++ b/src/gramps_main.py @@ -255,6 +255,17 @@ def on_add_child_clicked(obj): selectChild = childWindow.get_widget("selectChild") addChildList = childWindow.get_widget("addChild") addChildList.set_column_visibility(1,Config.id_visible) + + father = active_family.getFather() + if father != None: + fname = father.getPrimaryName().getName() + childWindow.get_widget("flabel").set_text(_("Relationship to %s") % fname) + + mother = active_family.getMother() + if mother != None: + mname = mother.getPrimaryName().getName() + childWindow.get_widget("mlabel").set_text(_("Relationship to %s") % mname) + redraw_child_list(2) selectChild.show() @@ -308,6 +319,16 @@ def on_add_new_child_clicked(obj): else: surname = "" + father = active_family.getFather() + if father != None: + fname = father.getPrimaryName().getName() + newChildWindow.get_widget("flabel").set_text(_("Relationship to %s") % fname) + + mother = active_family.getMother() + if mother != None: + mname = mother.getPrimaryName().getName() + newChildWindow.get_widget("mlabel").set_text(_("Relationship to %s") % mname) + newChildWindow.get_widget("childSurname").set_text(surname) newChildWindow.get_widget("addChild").show() @@ -382,7 +403,16 @@ def on_save_child_clicked(obj): active_family.addChild(select_child) mrel = const.childRelations[childWindow.get_widget("mrel").get_text()] + mother = active_family.getMother() + if mother and mother.getGender() != Person.female: + if mrel == "Birth": + mrel = "Unknown" + frel = const.childRelations[childWindow.get_widget("frel").get_text()] + father = active_family.getFather() + if father and father.getGender() != Person.male: + if frel == "Birth": + frel = "Unknown" if mrel == "Birth" and frel == "Birth": family = select_child.getMainFamily() @@ -931,13 +961,15 @@ def on_select_spouse_clicked(obj): active_person.addFamily(family) select_spouse.addFamily(family) - if active_person.getGender() == Person.male: - family.setFather(active_person) + if active_person == Person.male: family.setMother(select_spouse) + family.setFather(active_person) else: family.setFather(select_spouse) family.setMother(active_person) + family.setRelationship(const.save_frel(obj.get_data("d").get_text())) + select_spouse = None utils.destroy_passed_object(obj) @@ -1051,26 +1083,51 @@ def on_editperson_clicked(obj): def add_spouse(): spouseDialog = libglade.GladeXML(const.gladeFile, "spouseDialog") + spouseList = spouseDialog.get_widget("spouseList") + spouseDialog.get_widget("rel_combo").set_popdown_strings(const.familyRelations) + rel_type = spouseDialog.get_widget("rel_type") + rel_type.set_data("d",spouseList) + spouseDialog.get_widget("spouseDialog").set_data("d",rel_type) + spouseDialog.signal_autoconnect({ "on_spouseList_select_row" : on_spouseList_select_row, "on_select_spouse_clicked" : on_select_spouse_clicked, + "on_rel_type_changed" : on_rel_type_changed, "destroy_passed_object" : utils.destroy_passed_object }) - spouseList = spouseDialog.get_widget("spouseList") + rel_type.set_text(_("Unknown")) + +#------------------------------------------------------------------------- +# +# +# +#------------------------------------------------------------------------- +def on_rel_type_changed(obj): nameList = database.getPersonMap().values() nameList.sort(sort.by_last_name) + spouse_list = obj.get_data("d") + spouse_list.clear() + spouse_list.freeze() + text = obj.get_text() + gender = active_person.getGender() + if text == _("Partners"): + if gender == Person.male: + gender = Person.female + else: + gender = Person.male index = 0 for person in nameList: if person.getGender() == gender: continue - spouseList.append([Config.nameof(person),birthday(person)]) - spouseList.set_row_data(index,person) + spouse_list.append([person.getPrimaryName().getName(),birthday(person)]) + spouse_list.set_row_data(index,person) index = index + 1 + spouse_list.thaw() #------------------------------------------------------------------------- # @@ -1636,7 +1693,10 @@ def load_family(): menuitem.show() typeMenu.append(menuitem) for fam in family_types: - menuitem = GtkMenuItem("%s/%s" % (fam[2],fam[1])) + if active_person == fam[0].getFather(): + menuitem = GtkMenuItem("%s/%s" % (fam[1],fam[2])) + else: + menuitem = GtkMenuItem("%s/%s" % (fam[2],fam[1])) menuitem.set_data("parents",fam[0]) menuitem.connect("activate",on_current_type_changed) menuitem.show() @@ -1646,6 +1706,16 @@ 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: @@ -1768,7 +1838,9 @@ def load_tree(): tips = GtkTooltips() for i in range(1,16): - pv[i].set_text(text[i]) + pv[i].set_text(text[i]) + pv[i].set_position(0) + if tip[i] != "": tips.set_tip(pv[i],tip[i]) else: @@ -1849,7 +1921,10 @@ def display_marriage(family): else: for fam in child.getAltFamilyList(): if fam[0] == family: - status = "%s/%s" % (fam[2],fam[1]) + if active_person == family.getFather(): + status = "%s/%s" % (fam[2],fam[1]) + else: + status = "%s/%s" % (fam[1],fam[2]) if Config.show_detail: attr = "" diff --git a/src/marriage.glade b/src/marriage.glade index 7c4cfa044..d64f2c352 100644 --- a/src/marriage.glade +++ b/src/marriage.glade @@ -85,7 +85,7 @@ GtkLabel marriageTitle - + GTK_JUSTIFY_CENTER False 0.5 @@ -379,7 +379,7 @@ GtkButton - marriageSource + event_source Select the source of the information True @@ -408,7 +408,7 @@ GtkButton - button107 + event_note True clicked @@ -766,7 +766,7 @@ GtkButton - button102 + attr_source Select the source of the information True @@ -795,7 +795,7 @@ GtkButton - button106 + attr_note True clicked diff --git a/src/plugins/ReadGedcom.py b/src/plugins/ReadGedcom.py index 39794a784..be4bff39b 100644 --- a/src/plugins/ReadGedcom.py +++ b/src/plugins/ReadGedcom.py @@ -558,6 +558,8 @@ class GedcomParser: self.parse_name(name,2) elif matches[1] == "RIN" or matches[1] == "RFN": pass + elif matches[1] == "_UID": + self.person.setPafUid(matches[2]) elif matches[1] == "AFN" or matches[1] == "CHAN": self.ignore_sub_junk(2) elif matches[1] == "ALIA":