2003-07-22 Tim Waugh <twaugh@redhat.com>
* src/plugins/WriteGedcom.py, src/plugins/gedcomexport.glade: New option for obscuring names of living people. svn: r1918
This commit is contained in:
parent
b83feccfea
commit
b0d15a6b01
@ -1,3 +1,7 @@
|
||||
2003-07-22 Tim Waugh <twaugh@redhat.com>
|
||||
* src/plugins/WriteGedcom.py, src/plugins/gedcomexport.glade: New
|
||||
option for obscuring names of living people.
|
||||
|
||||
2003-07-21 Don Allingham <dallingham@users.sourceforge.net>
|
||||
* src/Sources.py: sort sources by title
|
||||
|
||||
|
@ -370,6 +370,7 @@ class GedcomWriter:
|
||||
"gnu_free" : self.gnu_free,
|
||||
"standard_copyright" : self.standard_copyright,
|
||||
"no_copyright" : self.no_copyright,
|
||||
"on_restrict_toggled": self.on_restrict_toggled,
|
||||
"on_ok_clicked" : self.on_ok_clicked
|
||||
})
|
||||
|
||||
@ -430,9 +431,15 @@ class GedcomWriter:
|
||||
def no_copyright(self,obj):
|
||||
self.copy = 2
|
||||
|
||||
def on_restrict_toggled(self,restrict):
|
||||
living = self.topDialog.get_widget("living")
|
||||
living.set_sensitive (restrict.get_active ())
|
||||
|
||||
def on_ok_clicked(self,obj):
|
||||
|
||||
self.restrict = self.topDialog.get_widget("restrict").get_active()
|
||||
self.living = (self.restrict and
|
||||
self.topDialog.get_widget("living").get_active())
|
||||
self.private = self.topDialog.get_widget("private").get_active()
|
||||
|
||||
cfilter = self.filter_menu.get_active().get_data("filter")
|
||||
@ -762,10 +769,21 @@ class GedcomWriter:
|
||||
|
||||
def write_person(self,person):
|
||||
self.writeln("0 @%s@ INDI" % self.pid(person.getId()))
|
||||
restricted = self.restrict and person.probablyAlive ()
|
||||
self.prefn(person)
|
||||
self.write_person_name(person.getPrimaryName(),person.getNickName())
|
||||
primaryname = person.getPrimaryName ()
|
||||
if restricted and self.living:
|
||||
primaryname = RelLib.Name (primaryname)
|
||||
primaryname.setFirstName ("Living")
|
||||
nickname = ""
|
||||
else:
|
||||
primaryname = person.getPrimaryName ()
|
||||
nickname = person.getNickName ()
|
||||
|
||||
if self.altname == GedcomInfo.ALT_NAME_STD:
|
||||
self.write_person_name(primaryname, nickname)
|
||||
|
||||
if (self.altname == GedcomInfo.ALT_NAME_STD and
|
||||
not (restricted and self.living)):
|
||||
for name in person.getAlternateNames():
|
||||
self.write_person_name(name,"")
|
||||
|
||||
@ -774,7 +792,7 @@ class GedcomWriter:
|
||||
elif person.getGender() == RelLib.Person.female:
|
||||
self.writeln("1 SEX F")
|
||||
|
||||
if not self.restrict or not person.probablyAlive():
|
||||
if not restricted:
|
||||
|
||||
birth = person.getBirth()
|
||||
if not (self.private and birth.getPrivacy()):
|
||||
@ -911,6 +929,7 @@ class GedcomWriter:
|
||||
if family != None and self.flist.has_key(family.getId()):
|
||||
self.writeln("1 FAMS @%s@" % self.fid(family.getId()))
|
||||
|
||||
if not restricted:
|
||||
if self.obje:
|
||||
for url in person.getUrlList():
|
||||
self.writeln('1 OBJE')
|
||||
|
@ -91,7 +91,7 @@
|
||||
<widget class="GtkTable" id="table3">
|
||||
<property name="border_width">12</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="n_rows">12</property>
|
||||
<property name="n_rows">13</property>
|
||||
<property name="n_columns">3</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="row_spacing">6</property>
|
||||
@ -418,6 +418,7 @@
|
||||
<property name="active">True</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="on_restrict_toggled" last_modification_time="Tue, 22 Jul 2003 09:50:16 GMT"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
@ -496,6 +497,50 @@
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkDrawingArea" id="drawingarea1">
|
||||
<property name="visible">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">12</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckButton" id="living">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">Use _Living as first name</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="active">True</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">3</property>
|
||||
<property name="top_attach">12</property>
|
||||
<property name="bottom_attach">13</property>
|
||||
<property name="x_options">fill</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
|
Loading…
Reference in New Issue
Block a user