* src/Marriage.py: fix lds menu
svn: r4110
This commit is contained in:
parent
3f12ec9563
commit
bcee9aa364
@ -1,4 +1,5 @@
|
|||||||
2005-03-02 Don Allingham <dallingham@users.sourceforge.net>
|
2005-03-02 Don Allingham <dallingham@users.sourceforge.net>
|
||||||
|
* src/Marriage.py: fix lds menu
|
||||||
* src/AddSpouse.py: use ComboBox instead of ComboBoxEntry for
|
* src/AddSpouse.py: use ComboBox instead of ComboBoxEntry for
|
||||||
handling child/parent relationships
|
handling child/parent relationships
|
||||||
* src/ChooseParents.py: use ComboBox instead of ComboBoxEntry for
|
* src/ChooseParents.py: use ComboBox instead of ComboBoxEntry for
|
||||||
|
@ -224,7 +224,6 @@ class Marriage:
|
|||||||
self.type_field.set_active(frel)
|
self.type_field.set_active(frel)
|
||||||
self.gid.set_text(family.get_gramps_id())
|
self.gid.set_text(family.get_gramps_id())
|
||||||
|
|
||||||
AutoComp.fill_combo(self.lds_temple,_temple_names)
|
|
||||||
|
|
||||||
place_list = self.pmap.keys()
|
place_list = self.pmap.keys()
|
||||||
place_list.sort()
|
place_list.sort()
|
||||||
@ -235,20 +234,16 @@ class Marriage:
|
|||||||
if lds_ord.get_place_handle():
|
if lds_ord.get_place_handle():
|
||||||
self.lds_place.child.set_text(lds_ord.get_place_handle().get_title())
|
self.lds_place.child.set_text(lds_ord.get_place_handle().get_title())
|
||||||
self.lds_date.set_text(lds_ord.get_date())
|
self.lds_date.set_text(lds_ord.get_date())
|
||||||
if lds_ord.get_temple() != "":
|
|
||||||
name = const.lds_temple_to_abrev[lds_ord.get_temple()]
|
|
||||||
else:
|
|
||||||
name = ""
|
|
||||||
self.lds_temple.child.set_text(name)
|
|
||||||
self.seal_stat = lds_ord.get_status()
|
self.seal_stat = lds_ord.get_status()
|
||||||
else:
|
else:
|
||||||
self.lds_temple.child.set_text("")
|
|
||||||
self.lds_place.child.set_text("")
|
self.lds_place.child.set_text("")
|
||||||
self.seal_stat = 0
|
self.seal_stat = 0
|
||||||
|
|
||||||
if self.family.get_complete_flag():
|
if self.family.get_complete_flag():
|
||||||
self.complete.set_active(1)
|
self.complete.set_active(1)
|
||||||
|
|
||||||
|
self.lds_field(lds_ord,self.lds_temple)
|
||||||
|
|
||||||
self.build_seal_menu()
|
self.build_seal_menu()
|
||||||
|
|
||||||
if lds_ord:
|
if lds_ord:
|
||||||
@ -304,9 +299,26 @@ class Marriage:
|
|||||||
self.top.get_widget('media_del').set_sensitive(mode)
|
self.top.get_widget('media_del').set_sensitive(mode)
|
||||||
self.top.get_widget('media_add').set_sensitive(mode)
|
self.top.get_widget('media_add').set_sensitive(mode)
|
||||||
self.top.get_widget('media_sel').set_sensitive(mode)
|
self.top.get_widget('media_sel').set_sensitive(mode)
|
||||||
|
|
||||||
self.window.show()
|
self.window.show()
|
||||||
|
|
||||||
|
def lds_field(self,lds_ord,combo):
|
||||||
|
|
||||||
|
cell = gtk.CellRendererText()
|
||||||
|
combo.pack_start(cell,True)
|
||||||
|
combo.add_attribute(cell,'text',0)
|
||||||
|
store = gtk.ListStore(str)
|
||||||
|
for value in _temple_names:
|
||||||
|
node = store.append()
|
||||||
|
store.set(node,0,unicode(value))
|
||||||
|
combo.set_model(store)
|
||||||
|
|
||||||
|
if lds_ord:
|
||||||
|
temple_code = const.lds_temple_to_abrev.get(lds_ord.get_temple(),"")
|
||||||
|
index = _temple_names.index(temple_code)
|
||||||
|
else:
|
||||||
|
index = 0
|
||||||
|
combo.set_active(index)
|
||||||
|
|
||||||
def close_child_windows(self):
|
def close_child_windows(self):
|
||||||
for child_window in self.child_windows.values():
|
for child_window in self.child_windows.values():
|
||||||
child_window.close(None)
|
child_window.close(None)
|
||||||
@ -551,10 +563,9 @@ class Marriage:
|
|||||||
changed = 1
|
changed = 1
|
||||||
|
|
||||||
date = unicode(self.lds_date.get_text())
|
date = unicode(self.lds_date.get_text())
|
||||||
temple = unicode(self.lds_temple.child.get_text())
|
try:
|
||||||
if const.lds_temple_codes.has_key(temple):
|
temple = _temple_names[self.lds_temple.get_active()]
|
||||||
temple = const.lds_temple_codes[temple]
|
except:
|
||||||
else:
|
|
||||||
temple = ""
|
temple = ""
|
||||||
|
|
||||||
place = self.get_place(0)
|
place = self.get_place(0)
|
||||||
@ -628,10 +639,9 @@ class Marriage:
|
|||||||
self.family.set_complete_flag(self.complete.get_active())
|
self.family.set_complete_flag(self.complete.get_active())
|
||||||
|
|
||||||
date = unicode(self.lds_date.get_text())
|
date = unicode(self.lds_date.get_text())
|
||||||
temple = unicode(self.lds_temple.child.get_text())
|
try:
|
||||||
if const.lds_temple_codes.has_key(temple):
|
temple = _temple_names[self.lds_temple.get_active()]
|
||||||
temple = const.lds_temple_codes[temple]
|
except:
|
||||||
else:
|
|
||||||
temple = ""
|
temple = ""
|
||||||
place = self.get_place(1,trans)
|
place = self.get_place(1,trans)
|
||||||
|
|
||||||
@ -640,7 +650,8 @@ class Marriage:
|
|||||||
if date or temple or place or self.seal_stat:
|
if date or temple or place or self.seal_stat:
|
||||||
lds_ord = RelLib.LdsOrd()
|
lds_ord = RelLib.LdsOrd()
|
||||||
lds_ord.set_date(date)
|
lds_ord.set_date(date)
|
||||||
lds_ord.set_temple(temple)
|
temple_code = const.lds_temple_codes.get(temple,"")
|
||||||
|
lds_ord.set_temple(temple_code)
|
||||||
lds_ord.set_status(self.seal_stat)
|
lds_ord.set_status(self.seal_stat)
|
||||||
lds_ord.set_place_handle(place)
|
lds_ord.set_place_handle(place)
|
||||||
self.family.set_lds_sealing(lds_ord)
|
self.family.set_lds_sealing(lds_ord)
|
||||||
@ -648,11 +659,12 @@ class Marriage:
|
|||||||
d = self.dp.parse(date)
|
d = self.dp.parse(date)
|
||||||
if d.is_equal(lds_ord.get_date_object()):
|
if d.is_equal(lds_ord.get_date_object()):
|
||||||
lds_ord.set_date_object(d)
|
lds_ord.set_date_object(d)
|
||||||
if lds_ord.get_temple() != temple:
|
temple_code = const.lds_temple_codes.get(temple,"")
|
||||||
lds_ord.set_temple(temple)
|
if lds_ord.get_temple() != temple_code:
|
||||||
|
lds_ord.set_temple(temple_code)
|
||||||
if lds_ord.get_status() != self.seal_stat:
|
if lds_ord.get_status() != self.seal_stat:
|
||||||
lds_ord.set_status(self.seal_stat)
|
lds_ord.set_status(self.seal_stat)
|
||||||
if lds_ord.get_place_handle() != place.get_handle():
|
if place and lds_ord.get_place_handle() != place.get_handle():
|
||||||
lds_ord.set_place_handle(place.get_handle())
|
lds_ord.set_place_handle(place.get_handle())
|
||||||
|
|
||||||
if self.lists_changed:
|
if self.lists_changed:
|
||||||
@ -807,10 +819,10 @@ class Marriage:
|
|||||||
Utils.unbold_label(self.notes_label)
|
Utils.unbold_label(self.notes_label)
|
||||||
|
|
||||||
date = unicode(self.lds_date.get_text())
|
date = unicode(self.lds_date.get_text())
|
||||||
temple = unicode(self.lds_temple.child.get_text())
|
|
||||||
if const.lds_temple_codes.has_key(temple):
|
try:
|
||||||
temple = const.lds_temple_codes[temple]
|
temple = _temple_names[self.lds_temple.get_active()]
|
||||||
else:
|
except:
|
||||||
temple = ""
|
temple = ""
|
||||||
|
|
||||||
if date or temple:
|
if date or temple:
|
||||||
|
@ -14655,23 +14655,6 @@ Other</property>
|
|||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkComboBoxEntry" id="lds_temple">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="add_tearoffs">False</property>
|
|
||||||
<property name="has_frame">True</property>
|
|
||||||
<property name="focus_on_click">True</property>
|
|
||||||
</widget>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">2</property>
|
|
||||||
<property name="right_attach">3</property>
|
|
||||||
<property name="top_attach">2</property>
|
|
||||||
<property name="bottom_attach">3</property>
|
|
||||||
<property name="x_options">fill</property>
|
|
||||||
<property name="y_options">fill</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkComboBox" id="lds_status">
|
<widget class="GtkComboBox" id="lds_status">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
@ -14687,6 +14670,22 @@ Other</property>
|
|||||||
<property name="y_options">fill</property>
|
<property name="y_options">fill</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkComboBox" id="lds_temple">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="add_tearoffs">False</property>
|
||||||
|
<property name="focus_on_click">True</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">2</property>
|
||||||
|
<property name="right_attach">3</property>
|
||||||
|
<property name="top_attach">2</property>
|
||||||
|
<property name="bottom_attach">3</property>
|
||||||
|
<property name="x_options">fill</property>
|
||||||
|
<property name="y_options">fill</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="padding">0</property>
|
<property name="padding">0</property>
|
||||||
|
Loading…
Reference in New Issue
Block a user