bug9787 Fix LDS editor for 'Family' related issues

This commit is contained in:
prculley 2016-10-30 08:03:05 -05:00
parent 22c1bd4e1c
commit e851211460

View File

@ -179,6 +179,9 @@ class EditLdsOrd(EditSecondary):
self.parents_label = self.top.get_object('parents_label')
self.parents = self.top.get_object('parents')
self.parents_select = self.top.get_object('parents_select')
image = self.parents_select.get_child()
image.set_from_icon_name('gtk-index', Gtk.IconSize.BUTTON)
self.parents_select.set_tooltip_text(_('Select Family'))
self.priv = PrivacyButton(
self.top.get_object("private"),
@ -230,22 +233,21 @@ class EditLdsOrd(EditSecondary):
self.db.readonly)
self.track_ref_for_deletion('status_menu')
self.ord_type_changed()
self.update_parent_label()
def _post_init(self):
self.ord_type_changed()
def ord_type_changed(self):
if self.obj.get_type() == LdsOrd.BAPTISM:
self.parents.hide()
self.parents_label.hide()
self.parents_select.hide()
elif self.obj.get_type() == LdsOrd.ENDOWMENT:
self.parents.hide()
self.parents_label.hide()
self.parents_select.hide()
elif self.obj.get_type() == LdsOrd.SEAL_TO_PARENTS:
if self.obj.get_type() == LdsOrd.SEAL_TO_PARENTS:
self.parents.show()
self.parents_label.show()
self.parents_select.show()
else:
self.parents.hide()
self.parents_label.hide()
self.parents_select.hide()
new_data = [(item[1],item[0]) for item in LdsOrd._STATUS_MAP
if item[0] in _DATA_MAP[self.obj.get_type()] ]
self.status_menu.change_menu(new_data)
@ -354,6 +356,11 @@ class EditFamilyLdsOrd(EditSecondary):
self.share_btn = self.top.get_object('share_place')
self.add_del_btn = self.top.get_object('add_del_place')
def _post_init(self):
self.parents.hide()
self.parents_label.hide()
self.parents_select.hide()
def _connect_signals(self):
self.define_cancel_button(self.top.get_object('cancel'))
self.define_help_button(self.top.get_object('help'))