* src/EditPerson.py: Fix LDS tab label behavior.

* src/Marriage.py: Fix LDS tab label behavior. Fix get_place for LDS (was
using Utils.get_place_from_list which uses deprecated gtk.List and does not
work).


svn: r2336
This commit is contained in:
Alex Roitman 2003-11-13 21:44:09 +00:00
parent 4951bc66b8
commit b5e029e27e
3 changed files with 57 additions and 7 deletions

View File

@ -19,6 +19,11 @@
files using -kb flag). Add with -kb flag. Add charset info to the header of
all templates.
* src/EditPerson.py: Fix LDS tab label behavior.
* src/Marriage.py: Fix LDS tab label behavior. Fix get_place for LDS (was
using Utils.get_place_from_list which uses deprecated gtk.List and does not
work).
2003-11-12 Don Allingham <dallingham@users.sourceforge.net>
* src/FamilyView.py: Change column sizes on the FamilyView to
fit with the new column

View File

@ -219,7 +219,7 @@ class EditPerson:
Utils.bold_label(self.inet_label)
if self.plist:
Utils.bold_label(self.addr_label)
if self.icon_list:
if self.person.getPhotoList():
Utils.bold_label(self.gallery_label)
# event display
@ -270,7 +270,7 @@ class EditPerson:
if GrampsCfg.uselds \
or (not self.lds_baptism.isEmpty()) \
or (not self.lds_endowment.isEmpty()) \
or (not self.lds_sealing.isEmpty()):
or (not self._sealing.isEmpty()):
self.get_widget("lds_tab").show()
self.get_widget("lds_page").show()
if (not self.lds_baptism.isEmpty()) \
@ -401,7 +401,7 @@ class EditPerson:
def lds_field(self,ord,combo,date,place):
combo.set_popdown_strings(_temple_names)
if ord:
if not ord.isEmpty():
stat = ord.getStatus()
date.set_text(ord.getDate())
if ord.getTemple() != "":
@ -1600,9 +1600,9 @@ class EditPerson:
self.load_person_image()
elif page == 2:
self.redraw_event_list()
elif page == 6 and self.not_loaded:
elif page == 7 and self.not_loaded:
self.not_loaded = 0
elif page == 8 and self.lds_not_loaded:
elif page == 9 and self.lds_not_loaded:
self.lds_not_loaded = 0
self.draw_lds()
text = self.notes_buffer.get_text(self.notes_buffer.get_start_iter(),
@ -1612,6 +1612,15 @@ class EditPerson:
else:
Utils.unbold_label(self.notes_label)
if self.lds_not_loaded == 0:
self.check_lds()
if self.lds_baptism.isEmpty() \
and self.lds_endowment.isEmpty() \
and self.lds_sealing.isEmpty():
Utils.unbold_label(self.lds_tab)
else:
Utils.bold_label(self.lds_tab)
def change_name(self,obj):
sel_objs = self.ntree.get_selected_objects()
if sel_objs:

View File

@ -21,6 +21,7 @@
# $Id$
import pickle
import string
#-------------------------------------------------------------------------
#
@ -75,6 +76,7 @@ class Marriage:
self.cb = callback
self.update_fv = update
self.pmap = {}
self.add_places = []
if family:
self.srcreflist = family.getSourceRefList()
@ -427,7 +429,7 @@ class Marriage:
else:
temple = ""
place = Utils.get_place_from_list(self.lds_place)
place = self.get_place(1)
ord = self.family.getLdsSeal()
if not ord:
@ -516,7 +518,7 @@ class Marriage:
temple = const.lds_temple_codes[temple]
else:
temple = ""
place = Utils.get_place_from_list(self.lds_place)
place = self.get_place(1)
ord = self.family.getLdsSeal()
if not ord:
@ -674,3 +676,37 @@ class Marriage:
Utils.bold_label(self.notes_label)
else:
Utils.unbold_label(self.notes_label)
date = self.lds_date.get_text()
temple = self.lds_temple.entry.get_text()
if const.lds_temple_codes.has_key(temple):
temple = const.lds_temple_codes[temple]
else:
temple = ""
place = self.get_place(1)
if date or temple or place:
Utils.bold_label(self.lds_label)
else:
Utils.unbold_label(self.lds_label)
def get_place(self,makenew=0):
field = self.lds_place.entry
text = string.strip(field.get_text())
if type(text) != type(u' '):
text = unicode(text)
if text:
if self.pmap.has_key(text):
return self.db.getPlaceMap()[self.pmap[text]]
elif makenew:
place = RelLib.Place()
place.set_title(text)
self.db.addPlace(place)
self.pmap[text] = place.getId()
self.add_places.append(place)
Utils.modified()
return place
else:
return None
else:
return None