2003-07-23 Tim Waugh <twaugh@redhat.com>

* src/plugins/WriteGedcom.py, src/plugins/gedcomexport.glade: New
        options for excluding sources and notes for living people.


svn: r1925
This commit is contained in:
Tim Waugh 2003-07-23 14:15:34 +00:00
parent a5c11501bb
commit fd5e6a761a
3 changed files with 87 additions and 18 deletions

View File

@ -1,4 +1,6 @@
2003-07-23 Tim Waugh <twaugh@redhat.com>
* src/plugins/WriteGedcom.py, src/plugins/gedcomexport.glade: New
options for excluding sources and notes for living people.
* src/plugins/Ancestors.py: More translation bits. Include
source author and publication information.

View File

@ -432,14 +432,21 @@ class GedcomWriter:
self.copy = 2
def on_restrict_toggled(self,restrict):
living = self.topDialog.get_widget("living")
living.set_sensitive (restrict.get_active ())
active = restrict.get_active ()
map (lambda x: x.set_sensitive (active),
[self.topDialog.get_widget("living"),
self.topDialog.get_widget("notes"),
self.topDialog.get_widget("sources")])
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.exclnotes = (self.restrict and
self.topDialog.get_widget("notes").get_active())
self.exclsrcs = (self.restrict and
self.topDialog.get_widget("sources").get_active())
self.private = self.topDialog.get_widget("private").get_active()
cfilter = self.filter_menu.get_active().get_data("filter")
@ -780,6 +787,14 @@ class GedcomWriter:
primaryname = person.getPrimaryName ()
nickname = person.getNickName ()
if restricted and self.exclnotes:
primaryname = RelLib.Name (primaryname)
primaryname.setNote ('')
if restricted and self.exclsrcs:
primaryname = RelLib.Name (primaryname)
primaryname.setSourceRefList ([])
self.write_person_name(primaryname, nickname)
if (self.altname == GedcomInfo.ALT_NAME_STD and
@ -939,6 +954,7 @@ class GedcomWriter:
if url.get_path():
self.writeln('2 FILE %s' % url.get_path())
if not restricted or not self.exclnotes:
if person.getNote():
self.write_long_text("NOTE",1,self.cnvtxt(person.getNote()))

View File

@ -499,21 +499,13 @@
</child>
<child>
<widget class="GtkHBox" id="hbox1">
<widget class="GtkTable" id="table4">
<property name="visible">True</property>
<property name="n_rows">3</property>
<property name="n_columns">2</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>
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
<widget class="GtkCheckButton" id="living">
@ -527,9 +519,68 @@
<property name="draw_indicator">True</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">0</property>
<property name="bottom_attach">1</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkDrawingArea" id="drawingarea1">
<property name="visible">True</property>
</widget>
<packing>
<property name="left_attach">0</property>
<property name="right_attach">1</property>
<property name="top_attach">0</property>
<property name="bottom_attach">1</property>
<property name="x_options">fill</property>
<property name="y_options">fill</property>
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="notes">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Exclude _notes</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="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="sources">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Exclude sour_ces</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="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
</widget>