LDS handling added, bugs in media config/references fixed
svn: r596
This commit is contained in:
parent
68465ccd5e
commit
f764038919
@ -494,7 +494,7 @@ def on_propertybox_apply(obj,page):
|
||||
output_preference = output_obj.get_data(DATA)
|
||||
|
||||
set_bool("/gramps/config/UseTabs",usetabs)
|
||||
set_bool("/gramps/config/MakeReference",makeref)
|
||||
set_bool("/gramps/config/MakeReference",mediaref)
|
||||
set_bool("/gramps/config/DisplayGlobal",globalprop)
|
||||
set_bool("/gramps/config/DisplayLocal",localprop)
|
||||
set_bool("/gramps/config/ShowCalendar",calendar)
|
||||
@ -661,6 +661,7 @@ def display_preferences_box(db):
|
||||
index_vis = prefsTop.get_widget("show_child_id")
|
||||
tabs = prefsTop.get_widget("usetabs")
|
||||
mr = prefsTop.get_widget("mediaref")
|
||||
mc = prefsTop.get_widget("mediacopy")
|
||||
dg = prefsTop.get_widget("globalprop")
|
||||
dl = prefsTop.get_widget("localprop")
|
||||
cal = prefsTop.get_widget("calendar")
|
||||
@ -673,7 +674,10 @@ def display_preferences_box(db):
|
||||
auto.set_active(autoload)
|
||||
detail.set_active(show_detail)
|
||||
tabs.set_active(usetabs)
|
||||
mr.set_active(mediaref)
|
||||
if mediaref:
|
||||
mr.set_active(1)
|
||||
else:
|
||||
mc.set_active(1)
|
||||
dg.set_active(globalprop)
|
||||
dl.set_active(localprop)
|
||||
cal.set_active(calendar)
|
||||
|
@ -3947,6 +3947,471 @@
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkTable</class>
|
||||
<name>table28</name>
|
||||
<rows>6</rows>
|
||||
<columns>3</columns>
|
||||
<homogeneous>False</homogeneous>
|
||||
<row_spacing>0</row_spacing>
|
||||
<column_spacing>0</column_spacing>
|
||||
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>label249</name>
|
||||
<label>LDS Baptism</label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>1</xalign>
|
||||
<yalign>0.5</yalign>
|
||||
<xpad>5</xpad>
|
||||
<ypad>5</ypad>
|
||||
<child>
|
||||
<left_attach>0</left_attach>
|
||||
<right_attach>1</right_attach>
|
||||
<top_attach>2</top_attach>
|
||||
<bottom_attach>3</bottom_attach>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<xexpand>False</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkEntry</class>
|
||||
<name>ldsbapdate</name>
|
||||
<can_focus>True</can_focus>
|
||||
<editable>True</editable>
|
||||
<text_visible>True</text_visible>
|
||||
<text_max_length>0</text_max_length>
|
||||
<text></text>
|
||||
<child>
|
||||
<left_attach>1</left_attach>
|
||||
<right_attach>2</right_attach>
|
||||
<top_attach>2</top_attach>
|
||||
<bottom_attach>3</bottom_attach>
|
||||
<xpad>5</xpad>
|
||||
<ypad>5</ypad>
|
||||
<xexpand>True</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkCombo</class>
|
||||
<name>ldsbaptemple</name>
|
||||
<value_in_list>True</value_in_list>
|
||||
<ok_if_empty>True</ok_if_empty>
|
||||
<case_sensitive>False</case_sensitive>
|
||||
<use_arrows>True</use_arrows>
|
||||
<use_arrows_always>False</use_arrows_always>
|
||||
<items></items>
|
||||
<child>
|
||||
<left_attach>2</left_attach>
|
||||
<right_attach>3</right_attach>
|
||||
<top_attach>2</top_attach>
|
||||
<bottom_attach>3</bottom_attach>
|
||||
<xpad>5</xpad>
|
||||
<ypad>5</ypad>
|
||||
<xexpand>True</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
|
||||
<widget>
|
||||
<class>GtkEntry</class>
|
||||
<child_name>GtkCombo:entry</child_name>
|
||||
<name>combo-entry1</name>
|
||||
<can_focus>True</can_focus>
|
||||
<editable>True</editable>
|
||||
<text_visible>True</text_visible>
|
||||
<text_max_length>0</text_max_length>
|
||||
<text></text>
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>label251</name>
|
||||
<label>Date</label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>0.5</xalign>
|
||||
<yalign>0.5</yalign>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<child>
|
||||
<left_attach>1</left_attach>
|
||||
<right_attach>2</right_attach>
|
||||
<top_attach>0</top_attach>
|
||||
<bottom_attach>1</bottom_attach>
|
||||
<xpad>5</xpad>
|
||||
<ypad>5</ypad>
|
||||
<xexpand>False</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>label252</name>
|
||||
<label>Temple</label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>0.5</xalign>
|
||||
<yalign>0.5</yalign>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<child>
|
||||
<left_attach>2</left_attach>
|
||||
<right_attach>3</right_attach>
|
||||
<top_attach>0</top_attach>
|
||||
<bottom_attach>1</bottom_attach>
|
||||
<xpad>5</xpad>
|
||||
<ypad>5</ypad>
|
||||
<xexpand>False</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>label253</name>
|
||||
<label>Endowment</label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>1</xalign>
|
||||
<yalign>0.5</yalign>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<child>
|
||||
<left_attach>0</left_attach>
|
||||
<right_attach>1</right_attach>
|
||||
<top_attach>3</top_attach>
|
||||
<bottom_attach>4</bottom_attach>
|
||||
<xpad>5</xpad>
|
||||
<ypad>5</ypad>
|
||||
<xexpand>False</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkEntry</class>
|
||||
<name>endowdate</name>
|
||||
<can_focus>True</can_focus>
|
||||
<editable>True</editable>
|
||||
<text_visible>True</text_visible>
|
||||
<text_max_length>0</text_max_length>
|
||||
<text></text>
|
||||
<child>
|
||||
<left_attach>1</left_attach>
|
||||
<right_attach>2</right_attach>
|
||||
<top_attach>3</top_attach>
|
||||
<bottom_attach>4</bottom_attach>
|
||||
<xpad>5</xpad>
|
||||
<ypad>5</ypad>
|
||||
<xexpand>True</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkCombo</class>
|
||||
<name>endowtemple</name>
|
||||
<value_in_list>True</value_in_list>
|
||||
<ok_if_empty>True</ok_if_empty>
|
||||
<case_sensitive>False</case_sensitive>
|
||||
<use_arrows>True</use_arrows>
|
||||
<use_arrows_always>False</use_arrows_always>
|
||||
<items></items>
|
||||
<child>
|
||||
<left_attach>2</left_attach>
|
||||
<right_attach>3</right_attach>
|
||||
<top_attach>3</top_attach>
|
||||
<bottom_attach>4</bottom_attach>
|
||||
<xpad>5</xpad>
|
||||
<ypad>5</ypad>
|
||||
<xexpand>True</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
|
||||
<widget>
|
||||
<class>GtkEntry</class>
|
||||
<child_name>GtkCombo:entry</child_name>
|
||||
<name>entry3</name>
|
||||
<can_focus>True</can_focus>
|
||||
<editable>True</editable>
|
||||
<text_visible>True</text_visible>
|
||||
<text_max_length>0</text_max_length>
|
||||
<text></text>
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkHSeparator</class>
|
||||
<name>hseparator8</name>
|
||||
<child>
|
||||
<left_attach>2</left_attach>
|
||||
<right_attach>3</right_attach>
|
||||
<top_attach>1</top_attach>
|
||||
<bottom_attach>2</bottom_attach>
|
||||
<xpad>5</xpad>
|
||||
<ypad>2</ypad>
|
||||
<xexpand>False</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkHSeparator</class>
|
||||
<name>hseparator7</name>
|
||||
<child>
|
||||
<left_attach>1</left_attach>
|
||||
<right_attach>2</right_attach>
|
||||
<top_attach>1</top_attach>
|
||||
<bottom_attach>2</bottom_attach>
|
||||
<xpad>5</xpad>
|
||||
<ypad>2</ypad>
|
||||
<xexpand>False</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkHSeparator</class>
|
||||
<name>hseparator6</name>
|
||||
<child>
|
||||
<left_attach>0</left_attach>
|
||||
<right_attach>1</right_attach>
|
||||
<top_attach>1</top_attach>
|
||||
<bottom_attach>2</bottom_attach>
|
||||
<xpad>5</xpad>
|
||||
<ypad>2</ypad>
|
||||
<xexpand>False</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkEntry</class>
|
||||
<name>sealdate</name>
|
||||
<can_focus>True</can_focus>
|
||||
<editable>True</editable>
|
||||
<text_visible>True</text_visible>
|
||||
<text_max_length>0</text_max_length>
|
||||
<text></text>
|
||||
<child>
|
||||
<left_attach>1</left_attach>
|
||||
<right_attach>2</right_attach>
|
||||
<top_attach>4</top_attach>
|
||||
<bottom_attach>5</bottom_attach>
|
||||
<xpad>5</xpad>
|
||||
<ypad>5</ypad>
|
||||
<xexpand>True</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkCombo</class>
|
||||
<name>sealtemple</name>
|
||||
<value_in_list>True</value_in_list>
|
||||
<ok_if_empty>True</ok_if_empty>
|
||||
<case_sensitive>False</case_sensitive>
|
||||
<use_arrows>True</use_arrows>
|
||||
<use_arrows_always>False</use_arrows_always>
|
||||
<items></items>
|
||||
<child>
|
||||
<left_attach>2</left_attach>
|
||||
<right_attach>3</right_attach>
|
||||
<top_attach>4</top_attach>
|
||||
<bottom_attach>5</bottom_attach>
|
||||
<xpad>5</xpad>
|
||||
<ypad>5</ypad>
|
||||
<xexpand>True</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
|
||||
<widget>
|
||||
<class>GtkEntry</class>
|
||||
<child_name>GtkCombo:entry</child_name>
|
||||
<name>entry5</name>
|
||||
<can_focus>True</can_focus>
|
||||
<editable>True</editable>
|
||||
<text_visible>True</text_visible>
|
||||
<text_max_length>0</text_max_length>
|
||||
<text></text>
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>label254</name>
|
||||
<label>Sealed to Parents</label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>1</xalign>
|
||||
<yalign>0.5</yalign>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<child>
|
||||
<left_attach>0</left_attach>
|
||||
<right_attach>1</right_attach>
|
||||
<top_attach>4</top_attach>
|
||||
<bottom_attach>5</bottom_attach>
|
||||
<xpad>5</xpad>
|
||||
<ypad>5</ypad>
|
||||
<xexpand>False</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>label250</name>
|
||||
<label>Ordinance</label>
|
||||
<justify>GTK_JUSTIFY_LEFT</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>0.5</xalign>
|
||||
<yalign>0.5</yalign>
|
||||
<xpad>5</xpad>
|
||||
<ypad>5</ypad>
|
||||
<child>
|
||||
<left_attach>0</left_attach>
|
||||
<right_attach>1</right_attach>
|
||||
<top_attach>0</top_attach>
|
||||
<bottom_attach>1</bottom_attach>
|
||||
<xpad>5</xpad>
|
||||
<ypad>5</ypad>
|
||||
<xexpand>False</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>True</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkOptionMenu</class>
|
||||
<name>sealparents</name>
|
||||
<can_focus>True</can_focus>
|
||||
<items>
|
||||
</items>
|
||||
<initial_choice>0</initial_choice>
|
||||
<child>
|
||||
<left_attach>2</left_attach>
|
||||
<right_attach>3</right_attach>
|
||||
<top_attach>5</top_attach>
|
||||
<bottom_attach>6</bottom_attach>
|
||||
<xpad>5</xpad>
|
||||
<ypad>5</ypad>
|
||||
<xexpand>False</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>label255</name>
|
||||
<label>Parents</label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>1</xalign>
|
||||
<yalign>0.5</yalign>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<child>
|
||||
<left_attach>1</left_attach>
|
||||
<right_attach>2</right_attach>
|
||||
<top_attach>5</top_attach>
|
||||
<bottom_attach>6</bottom_attach>
|
||||
<xpad>5</xpad>
|
||||
<ypad>5</ypad>
|
||||
<xexpand>False</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<child_name>Notebook:tab</child_name>
|
||||
<name>label248</name>
|
||||
<label>LDS</label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>0.5</xalign>
|
||||
<yalign>0.5</yalign>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
|
@ -44,6 +44,7 @@ import GDK
|
||||
import const
|
||||
import utils
|
||||
import Config
|
||||
import Date
|
||||
from RelLib import *
|
||||
import ImageSelect
|
||||
import sort
|
||||
@ -176,6 +177,13 @@ class EditPerson:
|
||||
self.name_note = self.get_widget("name_note")
|
||||
self.name_source = self.get_widget("name_source")
|
||||
self.gid = self.get_widget("gid")
|
||||
self.ldsbap_date = self.get_widget("ldsbapdate")
|
||||
self.ldsbap_temple = self.get_widget("ldsbaptemple")
|
||||
self.ldsend_date = self.get_widget("endowdate")
|
||||
self.ldsend_temple = self.get_widget("endowtemple")
|
||||
self.ldsseal_date = self.get_widget("sealdate")
|
||||
self.ldsseal_temple = self.get_widget("sealtemple")
|
||||
self.ldsseal_fam = self.get_widget("sealparents")
|
||||
|
||||
self.elist = person.getEventList()[:]
|
||||
self.nlist = person.getAlternateNames()[:]
|
||||
@ -247,6 +255,57 @@ class EditPerson:
|
||||
self.notes_field.insert_defaults(person.getNote())
|
||||
self.notes_field.set_word_wrap(1)
|
||||
|
||||
# lds stuff
|
||||
ord = person.getLdsBaptism()
|
||||
if ord:
|
||||
self.ldsbap_temple.entry.set_text(ord.getTemple())
|
||||
self.ldsbap_date.set_text(ord.getDate())
|
||||
|
||||
ord = person.getLdsEndowment()
|
||||
if ord:
|
||||
self.ldsend_temple.entry.set_text(ord.getTemple())
|
||||
self.ldsend_date.set_text(ord.getDate())
|
||||
|
||||
ord = person.getLdsSeal()
|
||||
if ord:
|
||||
self.ldsseal_temple.entry.set_text(ord.getTemple())
|
||||
self.ldsseal_date.set_text(ord.getDate())
|
||||
self.ldsfam = ord.getFamily()
|
||||
else:
|
||||
self.ldsfam = None
|
||||
|
||||
myMenu = gtk.GtkMenu()
|
||||
item = gtk.GtkMenuItem(_("None"))
|
||||
item.set_data("f",None)
|
||||
item.connect("activate",self.menu_changed)
|
||||
item.show()
|
||||
myMenu.append(item)
|
||||
|
||||
index = 0
|
||||
hist = 0
|
||||
for fam in [person.getMainFamily()] + person.getAltFamilyList():
|
||||
if fam == None:
|
||||
continue
|
||||
f = fam.getFather()
|
||||
m = fam.getMother()
|
||||
if f and m:
|
||||
name = _("%s and %s") % (Config.nameof(f),Config.nameof(m))
|
||||
elif f:
|
||||
name = Config.nameof(f)
|
||||
elif m:
|
||||
name = Config.nameof(m)
|
||||
else:
|
||||
name = _("unknown")
|
||||
item = gtk.GtkMenuItem(name)
|
||||
item.set_data("f",fam)
|
||||
item.connect("activate",self.menu_changed)
|
||||
item.show()
|
||||
myMenu.append(item)
|
||||
index = index + 1
|
||||
if fam == self.ldsfam:
|
||||
hist = index
|
||||
self.ldsseal_fam.set_menu(myMenu)
|
||||
self.ldsseal_fam.set_history(hist)
|
||||
|
||||
# draw lists
|
||||
self.redraw_event_list()
|
||||
@ -256,6 +315,9 @@ class EditPerson:
|
||||
self.redraw_url_list()
|
||||
self.window.show()
|
||||
|
||||
def menu_changed(self,obj):
|
||||
self.ldsfam = obj.get_data("f")
|
||||
|
||||
def get_widget(self,str):
|
||||
"""returns the widget related to the passed string"""
|
||||
return self.top.get_widget(str)
|
||||
@ -463,6 +525,50 @@ class EditPerson:
|
||||
if self.pname.getNote() != name.getNote():
|
||||
changed = 1
|
||||
|
||||
date = self.ldsbap_date.get_text()
|
||||
temple = self.ldsbap_temple.entry.get_text()
|
||||
ord = self.person.getLdsBaptism()
|
||||
if not ord:
|
||||
if date or temple:
|
||||
changed = 1
|
||||
else:
|
||||
d = Date()
|
||||
d.set(date)
|
||||
if compare_dates(d,ord.getDateObj()) != 0:
|
||||
changed = 1
|
||||
elif ord.getTemple() != temple:
|
||||
changed = 1
|
||||
|
||||
date = self.ldsend_date.get_text()
|
||||
temple = self.ldsend_temple.entry.get_text()
|
||||
ord = self.person.getLdsEndowment()
|
||||
if not ord:
|
||||
if date or temple:
|
||||
changed = 1
|
||||
else:
|
||||
d = Date()
|
||||
d.set(date)
|
||||
if compare_dates(d,ord.getDateObj()) != 0:
|
||||
changed = 1
|
||||
elif ord.getTemple() != temple:
|
||||
changed = 1
|
||||
|
||||
date = self.ldsseal_date.get_text()
|
||||
temple = self.ldsseal_temple.entry.get_text()
|
||||
ord = self.person.getLdsSeal()
|
||||
if not ord:
|
||||
if date or temple or self.ldsfam:
|
||||
changed = 1
|
||||
else:
|
||||
d = Date()
|
||||
d.set(date)
|
||||
if compare_dates(d,ord.getDateObj()) != 0:
|
||||
changed = 1
|
||||
elif ord.getTemple() != temple:
|
||||
changed = 1
|
||||
elif ord.getFamily() != self.ldsfam:
|
||||
changed = 1
|
||||
|
||||
bplace = string.strip(self.bplace.get_text())
|
||||
dplace = string.strip(self.dplace.get_text())
|
||||
|
||||
@ -778,6 +884,40 @@ class EditPerson:
|
||||
self.person.setNote(text)
|
||||
utils.modified()
|
||||
|
||||
date = self.ldsbap_date.get_text()
|
||||
temple = self.ldsbap_temple.entry.get_text()
|
||||
ord = self.person.getLdsBaptism()
|
||||
update_ord(self.person.setLdsBaptism,ord,date,temple)
|
||||
|
||||
date = self.ldsend_date.get_text()
|
||||
temple = self.ldsend_temple.entry.get_text()
|
||||
ord = self.person.getLdsEndowment()
|
||||
update_ord(self.person.setLdsEndowment,ord,date,temple)
|
||||
|
||||
date = self.ldsseal_date.get_text()
|
||||
temple = self.ldsseal_temple.entry.get_text()
|
||||
ord = self.person.getLdsSeal()
|
||||
if not ord:
|
||||
if self.ldsfam or date or temple:
|
||||
ord = LdsOrd()
|
||||
ord.setDate(date)
|
||||
ord.setTemple(temple)
|
||||
ord.setFamily(self.ldsfam)
|
||||
self.person.setLdsSeal(ord)
|
||||
utils.modified()
|
||||
else:
|
||||
d = Date()
|
||||
d.set(date)
|
||||
if compare_dates(d,ord.getDateObj()) != 0:
|
||||
ord.setDateObj(date)
|
||||
utils.modified()
|
||||
if ord.getTemple() != temple:
|
||||
ord.setTemple(temple)
|
||||
utils.modified()
|
||||
if ord.getFamily() != self.ldsfam:
|
||||
ord.setFamily(self.ldsfam)
|
||||
utils.modified()
|
||||
|
||||
self.update_lists()
|
||||
if self.callback:
|
||||
self.callback(self)
|
||||
@ -811,6 +951,24 @@ class EditPerson:
|
||||
self.not_loaded = 0
|
||||
self.gallery.load_images()
|
||||
|
||||
def update_ord(func,ord,date,temple):
|
||||
if not ord:
|
||||
if (date or temple):
|
||||
ord = LdsOrd()
|
||||
ord.setDate(date)
|
||||
ord.setTemple(temple)
|
||||
func(ord)
|
||||
utils.modified()
|
||||
else:
|
||||
d = Date()
|
||||
d.set(date)
|
||||
if compare_dates(d,ord.getDateObj()) != 0:
|
||||
ord.setDateObj(d)
|
||||
utils.modified()
|
||||
elif ord.getTemple() != temple:
|
||||
ord.setTemple(temple)
|
||||
utils.modified()
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
#
|
||||
|
@ -59,6 +59,7 @@ class GrampsParser:
|
||||
self.tlist = []
|
||||
self.conf = 2
|
||||
|
||||
self.ord = None
|
||||
self.objref = None
|
||||
self.object = None
|
||||
self.pref = None
|
||||
@ -118,6 +119,23 @@ class GrampsParser:
|
||||
person = self.db.personMap[id]
|
||||
self.db.setDefaultPerson(person)
|
||||
|
||||
def start_lds_ord(self,attrs):
|
||||
type = u2l(attrs['type'])
|
||||
self.ord = LdsOrd()
|
||||
if type == "baptism":
|
||||
self.person.setLdsBaptism(self.ord)
|
||||
elif type == "endowment":
|
||||
self.person.setLdsEndowment(self.ord)
|
||||
else:
|
||||
self.person.setLdsSeal(self.ord)
|
||||
|
||||
def start_temple(self,attrs):
|
||||
self.ord.setTemple(u2l(attrs['val']))
|
||||
|
||||
def start_sealed_to(self,attrs):
|
||||
id = u2l(attrs['ref'])
|
||||
self.ord.setFamily(self.db.findFamilyNoMap(id))
|
||||
|
||||
def start_place(self,attrs):
|
||||
if attrs.has_key('ref'):
|
||||
self.placeobj = self.db.findPlaceNoMap(u2l(attrs['ref']))
|
||||
@ -391,7 +409,9 @@ class GrampsParser:
|
||||
d.get_stop_date().setIsoDate(attrs['stop'])
|
||||
|
||||
def start_dateval(self,attrs):
|
||||
if self.address:
|
||||
if self.ord:
|
||||
d = self.ord.getDateObj()
|
||||
elif self.address:
|
||||
d = self.address.getDateObj()
|
||||
else:
|
||||
d = self.event.getDateObj()
|
||||
@ -406,9 +426,10 @@ class GrampsParser:
|
||||
else:
|
||||
d.get_start_date().setMode(None)
|
||||
|
||||
|
||||
def start_datestr(self,attrs):
|
||||
if self.address:
|
||||
if self.ord:
|
||||
d = self.ord.getDateObj()
|
||||
elif self.address:
|
||||
d = self.address.getDateObj()
|
||||
else:
|
||||
d = self.event.getDateObj()
|
||||
@ -543,6 +564,9 @@ class GrampsParser:
|
||||
def stop_spage(self,tag):
|
||||
self.source_ref.setPage(u2l(tag))
|
||||
|
||||
def stop_lds_ord(self,tag):
|
||||
self.ord = None
|
||||
|
||||
def stop_spubinfo(self,tag):
|
||||
self.source.setPubInfo(u2l(tag))
|
||||
|
||||
@ -699,6 +723,9 @@ class GrampsParser:
|
||||
"places" : (None, stop_places),
|
||||
"placeobj" : (start_placeobj,stop_placeobj),
|
||||
"location" : (start_location,None),
|
||||
"lds_ord" : (start_lds_ord, stop_lds_ord),
|
||||
"temple" : (start_temple, None),
|
||||
"sealed_to" : (start_sealed_to, None),
|
||||
"coord" : (start_coord,None),
|
||||
"pos" : (start_pos, None),
|
||||
"postal" : (None, stop_postal),
|
||||
|
@ -624,6 +624,7 @@ class GlobalMediaProperties:
|
||||
def button_press(self,obj,event):
|
||||
if len(obj.selection) <= 0:
|
||||
return
|
||||
if event.button == 1 and event.type == GDK._2BUTTON_PRESS:
|
||||
data = obj.get_row_data(obj.selection[0])
|
||||
if data != None:
|
||||
data[0](data[1],data[2])
|
||||
|
@ -29,6 +29,8 @@ from RelLib import *
|
||||
import utils
|
||||
import os
|
||||
import Config
|
||||
import const
|
||||
import RelImage
|
||||
|
||||
from intl import gettext
|
||||
_ = gettext
|
||||
|
@ -80,8 +80,6 @@ def import_media_object(filename,path,base):
|
||||
|
||||
try:
|
||||
path = "%s/%s" % (thumb,base)
|
||||
|
||||
print filename,path,const.thumbScale
|
||||
mk_thumb(filename,path,const.thumbScale)
|
||||
shutil.copy(filename,name)
|
||||
except:
|
||||
|
@ -87,6 +87,52 @@ class SourceNote:
|
||||
"""Return in note instance, not just the text"""
|
||||
return self.note
|
||||
|
||||
class LdsOrd:
|
||||
"""LDS Ordinance support"""
|
||||
def __init__(self,source=None):
|
||||
if source:
|
||||
self.famc = source.famc
|
||||
self.date = Date(source.date)
|
||||
self.temple = source.temple
|
||||
else:
|
||||
self.famc = None
|
||||
self.date = None
|
||||
self.temple = ""
|
||||
|
||||
def setFamily(self,family):
|
||||
self.famc = family
|
||||
|
||||
def getFamily(self):
|
||||
return self.famc
|
||||
|
||||
def setDate(self, date) :
|
||||
"""attempts to sets the date of the LdsOrd instance"""
|
||||
if not self.date:
|
||||
self.date = Date()
|
||||
self.date.set(date)
|
||||
|
||||
def getDate(self) :
|
||||
"""returns a string representation of the date of the LdsOrd instance"""
|
||||
if self.date:
|
||||
return self.date.getDate()
|
||||
return ""
|
||||
|
||||
def getDateObj(self):
|
||||
"""returns the Date object associated with the LdsOrd"""
|
||||
if not self.date:
|
||||
self.date = Date()
|
||||
return self.date
|
||||
|
||||
def setDateObj(self,date):
|
||||
"""sets the Date object associated with the LdsOrd"""
|
||||
self.date = date
|
||||
|
||||
def setTemple(self,temple):
|
||||
self.temple = temple
|
||||
|
||||
def getTemple(self):
|
||||
return self.temple
|
||||
|
||||
class DataObj(SourceNote):
|
||||
"""Base class for data elements, providing source, note, and privacy data"""
|
||||
|
||||
@ -782,6 +828,9 @@ class Person:
|
||||
self.paf_uid = ""
|
||||
self.position = None
|
||||
self.ancestor = None
|
||||
self.lds_bapt = None
|
||||
self.lds_endow = None
|
||||
self.lds_seal = None
|
||||
|
||||
def setPrimaryName(self,name):
|
||||
"""sets the primary name of the Person to the specified Name instance"""
|
||||
@ -1031,6 +1080,24 @@ class Person:
|
||||
def getAncestor(self):
|
||||
return self.ancestor
|
||||
|
||||
def setLdsBaptism(self,ord):
|
||||
self.lds_bapt = ord
|
||||
|
||||
def getLdsBaptism(self):
|
||||
return self.lds_bapt
|
||||
|
||||
def setLdsEndowment(self,ord):
|
||||
self.lds_endow = None
|
||||
|
||||
def getLdsEndowment(self):
|
||||
return self.lds_endow
|
||||
|
||||
def setLdsSeal(self,ord):
|
||||
self.lds_seal = ord
|
||||
|
||||
def getLdsSeal(self):
|
||||
return self.lds_seal
|
||||
|
||||
class Event(DataObj):
|
||||
"""Event record, recording the event type, description, place, and date
|
||||
of a particular event"""
|
||||
|
@ -128,6 +128,27 @@ def dump_my_event(g,name,event,index=1):
|
||||
dump_source_ref(g,s,index+1)
|
||||
g.write("%s</event>\n" % sp)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
#
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
def dump_ordinance(g,name,ord,index=1):
|
||||
if not ord:
|
||||
return
|
||||
|
||||
sp = " " * index
|
||||
sp2 = " " * (index+1)
|
||||
g.write('%s<lds_ord type="%s">\n' % (sp,fix(name)))
|
||||
dateobj = ord.getDateObj()
|
||||
if dateobj != None and not dateobj.isEmpty():
|
||||
write_date(g,dateobj,index+1)
|
||||
if ord.getTemple():
|
||||
g.write('%s<temple val="%s"/>\n' % (sp2,fix(ord.getTemple())))
|
||||
if ord.getFamily():
|
||||
g.write('%s<sealed_to ref="%s"/>\n' % (sp2,fix(ord.getFamily().getId())))
|
||||
g.write('%s</lds_ord>\n' % sp)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
#
|
||||
@ -521,13 +542,16 @@ def write_xml_data(database, g, callback, sp):
|
||||
for event in person.getEventList():
|
||||
dump_event(g,event,3)
|
||||
|
||||
dump_ordinance(g,"baptism",person.getLdsBaptism(),3)
|
||||
dump_ordinance(g,"endowment",person.getLdsEndowment(),3)
|
||||
dump_ordinance(g,"sealed_to_parents",person.getLdsSeal(),3)
|
||||
|
||||
write_photo_list(g,person.getPhotoList())
|
||||
|
||||
if len(person.getAddressList()) > 0:
|
||||
for address in person.getAddressList():
|
||||
g.write(' <address%s>\n' % conf_priv(address))
|
||||
write_date(g,address.getDateObj(),4)
|
||||
# write_line(g,"date",address.getDateObj().getSaveDate(),4)
|
||||
write_line(g,"street",address.getStreet(),4)
|
||||
write_line(g,"city",address.getCity(),4)
|
||||
write_line(g,"state",address.getState(),4)
|
||||
|
@ -2004,6 +2004,12 @@ AbiWord
|
||||
<name>mediaref</name>
|
||||
<border_width>5</border_width>
|
||||
<can_focus>True</can_focus>
|
||||
<signal>
|
||||
<name>toggled</name>
|
||||
<handler>on_object_toggled</handler>
|
||||
<object>propertybox</object>
|
||||
<last_modification_time>Fri, 30 Nov 2001 01:29:56 GMT</last_modification_time>
|
||||
</signal>
|
||||
<label>Make a reference to the object when the object is dropped</label>
|
||||
<active>True</active>
|
||||
<draw_indicator>True</draw_indicator>
|
||||
@ -2020,6 +2026,12 @@ AbiWord
|
||||
<name>mediacopy</name>
|
||||
<border_width>5</border_width>
|
||||
<can_focus>True</can_focus>
|
||||
<signal>
|
||||
<name>toggled</name>
|
||||
<handler>on_object_toggled</handler>
|
||||
<object>propertybox</object>
|
||||
<last_modification_time>Fri, 30 Nov 2001 01:30:09 GMT</last_modification_time>
|
||||
</signal>
|
||||
<label>Make a local copy when the object is dropped</label>
|
||||
<active>False</active>
|
||||
<draw_indicator>True</draw_indicator>
|
||||
@ -2036,6 +2048,12 @@ AbiWord
|
||||
<name>globalprop</name>
|
||||
<border_width>5</border_width>
|
||||
<can_focus>True</can_focus>
|
||||
<signal>
|
||||
<name>toggled</name>
|
||||
<handler>on_object_toggled</handler>
|
||||
<object>propertybox</object>
|
||||
<last_modification_time>Fri, 30 Nov 2001 01:30:24 GMT</last_modification_time>
|
||||
</signal>
|
||||
<label>Display global properties editor when object is dropped</label>
|
||||
<active>True</active>
|
||||
<draw_indicator>True</draw_indicator>
|
||||
@ -2072,6 +2090,12 @@ AbiWord
|
||||
<name>localprop</name>
|
||||
<border_width>5</border_width>
|
||||
<can_focus>True</can_focus>
|
||||
<signal>
|
||||
<name>toggled</name>
|
||||
<handler>on_object_toggled</handler>
|
||||
<object>propertybox</object>
|
||||
<last_modification_time>Fri, 30 Nov 2001 01:30:36 GMT</last_modification_time>
|
||||
</signal>
|
||||
<label>Display local properties editor when object is dropped</label>
|
||||
<active>True</active>
|
||||
<draw_indicator>True</draw_indicator>
|
||||
|
@ -42,12 +42,12 @@ from latin_utf8 import latin_to_utf8
|
||||
# GEDCOM feature support
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
_ADOPT_NONE = 0
|
||||
_ADOPT_EVENT = 1
|
||||
_ADOPT_FTW = 2
|
||||
_ADOPT_LEGACY = 3
|
||||
_ADOPT_PEDI = 4
|
||||
_ADOPT_EVENT_EXT = 5
|
||||
_ADOP_NONE = 0
|
||||
_ADOP_EVENT = 1
|
||||
_ADOP_FTW = 2
|
||||
_ADOP_LEGACY = 3
|
||||
_ADOP_PEDI = 4
|
||||
_ADOP_EVEXT = 5
|
||||
|
||||
_CONC_OK = 0
|
||||
_CONC_BROKEN = 1
|
||||
@ -56,7 +56,7 @@ _ALT_NONE = 0
|
||||
_ALT_STD = 1
|
||||
_ALT_ALIAS = 2
|
||||
_ALT_AKA = 3
|
||||
_ALT_EVENT_AKA = 4
|
||||
_ALT_EVAKA = 4
|
||||
|
||||
_CAL_NO = 0
|
||||
_CAL_YES = 1
|
||||
@ -65,17 +65,23 @@ _EVEN_NONE = 0
|
||||
_EVEN_GED = 1
|
||||
_EVEN_FTW = 2
|
||||
|
||||
_OBJE_NO = 0
|
||||
_OBJE_YES = 1
|
||||
|
||||
_RESI_ADDR = 0
|
||||
_RESI_PLAC = 1
|
||||
|
||||
targets = [
|
||||
("Standard GEDCOM 5.5", "GEDCOM 5.5", _ADOPT_EVENT_EXT, _CONC_OK, _ALT_STD, _CAL_YES, _EVEN_GED),
|
||||
("Brother's Keeper", "BROSKEEP", _ADOPT_NONE, _CONC_OK, _ALT_NONE, _CAL_NO, _EVEN_GED),
|
||||
("Family Origins", "FamilyOrigins", _ADOPT_EVENT, _CONC_BROKEN, _ALT_EVENT_AKA, _CAL_NO, _EVEN_GED),
|
||||
("Family Tree Maker", "FTW", _ADOPT_FTW, _CONC_BROKEN, _ALT_ALIAS, _CAL_NO, _EVEN_FTW),
|
||||
("Ftree", "", _ADOPT_NONE, _CONC_BROKEN, _ALT_NONE, _CAL_NO, _EVEN_GED),
|
||||
("GeneWeb", "", _ADOPT_EVENT_EXT, _CONC_OK, _ALT_NONE, _CAL_YES, _EVEN_GED),
|
||||
("Legacy", "Legacy", _ADOPT_LEGACY, _CONC_BROKEN, _ALT_STD, _CAL_NO, _EVEN_GED),
|
||||
("Personal Ancestral File", "PAF", _ADOPT_PEDI, _CONC_OK, _ALT_AKA, _CAL_NO, _EVEN_GED),
|
||||
("Reunion", "REUNION", _ADOPT_NONE, _CONC_BROKEN, _ALT_NONE, _CAL_NO, _EVEN_GED),
|
||||
("Visual Genealogie", "", _ADOPT_NONE, _CONC_BROKEN, _ALT_NONE, _CAL_NO, _EVEN_GED),
|
||||
("Standard GEDCOM 5.5","GEDCOM 5.5",_ADOP_EVEXT,_CONC_OK,_ALT_STD,_CAL_YES,_EVEN_GED,_OBJE_YES,_RESI_ADDR),
|
||||
("Brother's Keeper","BROSKEEP",_ADOP_NONE,_CONC_OK,_ALT_NONE,_CAL_NO,_EVEN_GED,_OBJE_NO,_RESI_ADDR),
|
||||
("Family Origins","FamilyOrigins",_ADOP_EVENT,_CONC_BROKEN,_ALT_EVAKA,_CAL_NO,_EVEN_GED,_OBJE_NO,_RESI_ADDR),
|
||||
("Family Tree Maker","FTW",_ADOP_FTW,_CONC_BROKEN,_ALT_ALIAS,_CAL_NO,_EVEN_FTW,_OBJE_NO,_RESI_PLAC),
|
||||
("Ftree","",_ADOP_NONE,_CONC_BROKEN,_ALT_NONE,_CAL_NO,_EVEN_GED,_OBJE_NO,_RESI_ADDR),
|
||||
("GeneWeb","",_ADOP_EVEXT,_CONC_OK,_ALT_NONE,_CAL_YES,_EVEN_GED,_OBJE_NO,_RESI_ADDR),
|
||||
("Legacy","Legacy",_ADOP_LEGACY,_CONC_BROKEN,_ALT_STD,_CAL_NO,_EVEN_GED,_OBJE_NO,_RESI_ADDR),
|
||||
("Personal Ancestral File","PAF",_ADOP_PEDI,_CONC_OK,_ALT_AKA,_CAL_NO,_EVEN_GED,_OBJE_NO,_RESI_ADDR),
|
||||
("Reunion", "REUNION", _ADOP_NONE,_CONC_BROKEN,_ALT_NONE,_CAL_NO,_EVEN_GED,_OBJE_NO,_RESI_ADDR),
|
||||
("Visual Genealogie","",_ADOP_NONE,_CONC_BROKEN,_ALT_NONE,_CAL_NO,_EVEN_GED,_OBJE_NO,_RESI_ADDR),
|
||||
]
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@ -269,6 +275,17 @@ def add_persons_sources(person,slist,private):
|
||||
if sbase != None and sbase not in slist:
|
||||
slist.append(sbase)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
#
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
def addr_append(text,data):
|
||||
if data:
|
||||
return "%s, %s" % (text,data)
|
||||
else:
|
||||
return text
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
#
|
||||
@ -407,7 +424,7 @@ class GedcomWriter:
|
||||
self.plist = []
|
||||
self.slist = []
|
||||
self.flist = []
|
||||
self.adopt = _ADOPT_EVENT
|
||||
self.adopt = _ADOP_EVENT
|
||||
self.fidval = 0
|
||||
self.fidmap = {}
|
||||
self.pidval = 0
|
||||
@ -451,10 +468,10 @@ class GedcomWriter:
|
||||
|
||||
target_obj = self.topDialog.get_widget("target")
|
||||
myMenu = gtk.GtkMenu()
|
||||
for (name,dest,adopt,conc,alt,cal,even) in targets:
|
||||
for (name,dest,adopt,conc,alt,cal,even,obje,resi) in targets:
|
||||
menuitem = gtk.GtkMenuItem(name)
|
||||
myMenu.append(menuitem)
|
||||
menuitem.set_data("data",(dest,adopt,conc,alt,cal,even))
|
||||
menuitem.set_data("data",(dest,adopt,conc,alt,cal,even,obje,resi))
|
||||
menuitem.show()
|
||||
|
||||
target_obj.set_menu(myMenu)
|
||||
@ -469,7 +486,7 @@ class GedcomWriter:
|
||||
|
||||
filter = self.filter_menu.get_active().get_data("filter")
|
||||
act_tgt = self.target_menu.get_active()
|
||||
(self.dest,self.adopt,self.conc,self.altname,self.cal,self.even) = act_tgt.get_data("data")
|
||||
(self.dest,self.adopt,self.conc,self.altname,self.cal,self.even,self.obje,self.resi) = act_tgt.get_data("data")
|
||||
|
||||
if self.topDialog.get_widget("ansel").get_active():
|
||||
self.cnvtxt = latin_to_ansel
|
||||
@ -622,7 +639,7 @@ class GedcomWriter:
|
||||
|
||||
for person in family.getChildList():
|
||||
self.g.write("1 CHIL @%s@\n" % self.pid(person.getId()))
|
||||
if self.adopt == _ADOPT_FTW:
|
||||
if self.adopt == _ADOP_FTW:
|
||||
if person.getMainFamily() == family:
|
||||
self.g.write('2 _FREL Natural\n')
|
||||
self.g.write('2 _MREL Natural\n')
|
||||
@ -632,7 +649,7 @@ class GedcomWriter:
|
||||
self.g.write('2 _FREL %s\n' % f[2])
|
||||
self.g.write('2 _MREL %s\n' % f[1])
|
||||
break
|
||||
if self.adopt == _ADOPT_LEGACY:
|
||||
if self.adopt == _ADOP_LEGACY:
|
||||
for f in person.getAltFamilyList():
|
||||
if f[0] == family:
|
||||
self.g.write('2 _STAT %s\n' % f[2])
|
||||
@ -711,7 +728,7 @@ class GedcomWriter:
|
||||
else:
|
||||
val = ""
|
||||
|
||||
if self.adopt == _ADOPT_EVENT and val == "ADOP":
|
||||
if self.adopt == _ADOP_EVENT and val == "ADOP":
|
||||
ad = 1
|
||||
self.g.write('1 ADOP\n')
|
||||
fam = None
|
||||
@ -740,7 +757,7 @@ class GedcomWriter:
|
||||
|
||||
self.dump_event_stats(event)
|
||||
|
||||
if self.adopt == _ADOPT_EVENT and ad == 0 and len(person.getAltFamilyList()) != 0:
|
||||
if self.adopt == _ADOP_EVENT and ad == 0 and len(person.getAltFamilyList()) != 0:
|
||||
self.g.write('1 ADOP\n')
|
||||
fam = None
|
||||
for f in person.getAltFamilyList():
|
||||
@ -784,6 +801,7 @@ class GedcomWriter:
|
||||
datestr = addr.getDateObj().getSaveDate()
|
||||
if datestr != "":
|
||||
self.g.write("2 DATE %s\n" % self.cnvtxt(datestr))
|
||||
if self.resi == 0:
|
||||
self.write_long_text("ADDR",2,addr.getStreet())
|
||||
if addr.getCity() != "":
|
||||
self.g.write("3 CITY %s\n" % addr.getCity())
|
||||
@ -793,6 +811,14 @@ class GedcomWriter:
|
||||
self.g.write("3 POST %s\n" % addr.getPostal())
|
||||
if addr.getCountry() != "":
|
||||
self.g.write("3 CTRY %s\n" % addr.getCountry())
|
||||
else:
|
||||
text = addr.getStreet()
|
||||
text = addr_append(text,addr.getCity())
|
||||
text = addr_append(text,addr.getState())
|
||||
text = addr_append(text,addr.getPostal())
|
||||
text = addr_append(text,addr.getCountry())
|
||||
if text:
|
||||
self.g.write("2 PLAC %s\n" % text)
|
||||
if addr.getNote() != "":
|
||||
self.write_long_text("NOTE",3,addr.getNote())
|
||||
for srcref in addr.getSourceRefList():
|
||||
@ -804,7 +830,7 @@ class GedcomWriter:
|
||||
|
||||
for family in person.getAltFamilyList():
|
||||
self.g.write("1 FAMC @%s@\n" % self.fid(family[0].getId()))
|
||||
if self.adopt == _ADOPT_PEDI:
|
||||
if self.adopt == _ADOP_PEDI:
|
||||
if string.lower(family[1]) == "adopted":
|
||||
self.g.write("2 PEDI Adopted\n")
|
||||
|
||||
@ -812,6 +838,7 @@ class GedcomWriter:
|
||||
if family != None and family in self.flist:
|
||||
self.g.write("1 FAMS @%s@\n" % self.fid(family.getId()))
|
||||
|
||||
if self.obje:
|
||||
for url in person.getUrlList():
|
||||
self.g.write('1 OBJE\n')
|
||||
self.g.write('2 FORM URL\n')
|
||||
|
Loading…
Reference in New Issue
Block a user