From a0a3d586b9db60d9bf80eeac2bf1e47c890079fc Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Thu, 14 Feb 2002 14:34:58 +0000 Subject: [PATCH] LDS uses AutoComp for marriages now svn: r774 --- src/EditPerson.py | 8 ++++++++ src/Marriage.py | 9 +++++++-- src/SelectChild.py | 6 +++--- src/gramps_main.py | 4 +++- 4 files changed, 21 insertions(+), 6 deletions(-) diff --git a/src/EditPerson.py b/src/EditPerson.py index 786dbb899..637989724 100644 --- a/src/EditPerson.py +++ b/src/EditPerson.py @@ -751,6 +751,10 @@ class EditPerson: text = self.notes_field.get_chars(0,-1) idval = self.gid.get_text() + self.pmap = {} + for p in self.db.getPlaces(): + self.pmap[p.get_title()] = p + changed = 0 name = self.person.getPrimaryName() @@ -1080,6 +1084,10 @@ class EditPerson: self.person.setNickName(nick) utils.modified() + self.pmap = {} + for p in self.db.getPlaces(): + self.pmap[p.get_title()] = p + self.birth.setDate(self.bdate.get_text()) bplace = string.strip(self.bplace.get_text()) self.birth.setPlace(self.get_place(self.bplace,1)) diff --git a/src/Marriage.py b/src/Marriage.py index 9c572b4c3..d8072d0d2 100644 --- a/src/Marriage.py +++ b/src/Marriage.py @@ -39,6 +39,7 @@ import libglade import const import Config import utils +import AutoComp from RelLib import * import ImageSelect from intl import gettext @@ -65,6 +66,9 @@ class Marriage: self.db = db self.path = db.getSavePath() self.cb = callback + self.pmap = {} + for p in db.getPlaces(): + self.pmap[p.get_title()] = p self.top = libglade.GladeXML(const.marriageFile,"marriageEditor") top_window = self.get_widget("marriageEditor") @@ -142,7 +146,8 @@ class Marriage: plist = self.db.getPlaceMap().values() ord = self.family.getLdsSeal() if ord: - utils.attach_places(plist,self.lds_place,ord.getPlace()) + if ord.getPlace(): + self.lds_place.entry.set_text(ord.getPlace().get_title()) self.lds_date.set_text(ord.getDate()) if ord.getTemple() != "": name = const.lds_temple_to_abrev[ord.getTemple()] @@ -151,9 +156,9 @@ class Marriage: self.lds_temple.entry.set_text(name) self.seal_stat = ord.getStatus() else: - utils.attach_places(plist,self.lds_place,None) self.lds_temple.entry.set_text("") self.seal_stat = 0 + self.autoplace = AutoComp.AutoCombo(self.lds_place,self.pmap.keys()) self.build_seal_menu() diff --git a/src/SelectChild.py b/src/SelectChild.py index 8eca25aea..4d7ece7b3 100644 --- a/src/SelectChild.py +++ b/src/SelectChild.py @@ -382,13 +382,13 @@ class NewChild: # must do an apply filter here to make sure the main window gets updated - self.update(self.family,person) + self.update(self.family,person,[]) utils.modified() utils.destroy_passed_object(obj) self.new_child = person - def other_update(self,arg1,arg2): - self.update(None,self.new_child) + def other_update(self,arg1,plist): + self.update(None,self.new_child,plist) def on_edit_new_child(self,obj): import EditPerson diff --git a/src/gramps_main.py b/src/gramps_main.py index 9514675d4..242a99ee8 100755 --- a/src/gramps_main.py +++ b/src/gramps_main.py @@ -1356,9 +1356,11 @@ def new_after_edit(epo,plist): # # #------------------------------------------------------------------------- -def update_after_newchild(family,person): +def update_after_newchild(family,person,plist): load_family(family) redisplay_person_list(person) + for p in plist: + place_view.new_place_after_edit(p) #------------------------------------------------------------------------- #