* src/edit_person.glade: Add completeness check button.
* src/RelLib.py (Person.setComplete, Person.getComplete): Add functions. * src/WriteXML.py (write_id): Save completeness info. * src/GrampsParser.py (GrampsParser.start_person, GrampsImportParser.start_person, GrampsImportParser.start_family): Parse completeness. * src/EditPerson.py: Add support for completeness. svn: r2430
This commit is contained in:
parent
4dc578fb36
commit
65aef4214d
@ -13,6 +13,13 @@
|
||||
doc/gramps-manual/C/mainwin.xml,
|
||||
doc/gramps-manual/C/getstart.xml,
|
||||
doc/gramps-manual/C/usage.xml: Add copyright info to header.
|
||||
* src/edit_person.glade: Add completeness check button.
|
||||
* src/RelLib.py (Person.setComplete, Person.getComplete): Add functions.
|
||||
* src/WriteXML.py (write_id): Save completeness info.
|
||||
* src/GrampsParser.py (GrampsParser.start_person,
|
||||
GrampsImportParser.start_person, GrampsImportParser.start_family):
|
||||
Parse completeness.
|
||||
* src/EditPerson.py: Add support for completeness.
|
||||
|
||||
2003-12-02 Tim Waugh <twaugh@redhat.com>
|
||||
* gramps.spec.in: Add more docs.
|
||||
|
@ -106,6 +106,7 @@ class EditPerson:
|
||||
self.gallery = ImageSelect.Gallery(person, self.path, self.icon_list,
|
||||
self.db,self,self.window)
|
||||
|
||||
self.complete = self.get_widget('complete')
|
||||
self.name_delete_btn = self.top.get_widget('aka_delete')
|
||||
self.name_edit_btn = self.top.get_widget('aka_edit')
|
||||
self.web_delete_btn = self.top.get_widget('delete_url')
|
||||
@ -382,6 +383,9 @@ class EditPerson:
|
||||
self.top.get_widget('edit_src'),
|
||||
self.top.get_widget('del_src'))
|
||||
|
||||
if self.person.getComplete():
|
||||
self.complete.set_active(1)
|
||||
|
||||
self.redraw_event_list()
|
||||
self.redraw_attr_list()
|
||||
self.redraw_addr_list()
|
||||
@ -1016,6 +1020,9 @@ class EditPerson:
|
||||
changed = 0
|
||||
name = self.person.getPrimaryName()
|
||||
|
||||
if self.complete.get_active() != self.person.getComplete():
|
||||
changed = 1
|
||||
|
||||
if self.person.getId() != idval:
|
||||
changed = 1
|
||||
if suffix != name.getSuffix():
|
||||
@ -1486,6 +1493,10 @@ class EditPerson:
|
||||
self.person.setNote(text)
|
||||
Utils.modified()
|
||||
|
||||
if self.complete.get_active() != self.person.getComplete():
|
||||
self.person.setComplete(self.complete.get_active())
|
||||
Utils.modified()
|
||||
|
||||
if self.lds_not_loaded == 0:
|
||||
self.check_lds()
|
||||
ord = RelLib.LdsOrd(self.person.getLdsBaptism())
|
||||
|
@ -18,6 +18,8 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# $Id$
|
||||
|
||||
import const
|
||||
import RelLib
|
||||
import Date
|
||||
@ -335,6 +337,10 @@ class GrampsParser:
|
||||
self.callback(float(self.count)/float(self.entries))
|
||||
self.count = self.count + 1
|
||||
self.person = self.db.findPersonNoMap(attrs["id"])
|
||||
if attrs.has_key("complete"):
|
||||
self.person.setComplete(int(attrs['complete']))
|
||||
else:
|
||||
self.person.setComplete(0)
|
||||
|
||||
def start_people(self,attrs):
|
||||
if attrs.has_key("default"):
|
||||
@ -942,6 +948,10 @@ class GrampsImportParser(GrampsParser):
|
||||
self.callback(float(self.count)/float(self.entries))
|
||||
self.count = self.count + 1
|
||||
self.person = self.db.findPersonNoConflicts(attrs["id"],self.pmap)
|
||||
if attrs.has_key("complete"):
|
||||
self.person.setComplete(int(attrs['complete']))
|
||||
else:
|
||||
self.person.setComplete(0)
|
||||
|
||||
def start_father(self,attrs):
|
||||
self.family.Father = self.db.findPersonNoConflicts(attrs["ref"],self.pmap)
|
||||
@ -959,6 +969,10 @@ class GrampsImportParser(GrampsParser):
|
||||
self.family = self.db.findFamilyNoConflicts(attrs["id"],self.fmap)
|
||||
if attrs.has_key("type"):
|
||||
self.family.setRelationship(const.save_frel(attrs["type"]))
|
||||
if attrs.has_key("complete"):
|
||||
self.family.setComplete(int(attrs['complete']))
|
||||
else:
|
||||
self.family.setComplete(0)
|
||||
|
||||
def start_source(self,attrs):
|
||||
self.source = self.db.findSourceNoConflicts(attrs["id"],self.smap)
|
||||
|
@ -18,6 +18,8 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# $Id$
|
||||
|
||||
"""The core library of the GRAMPS database"""
|
||||
|
||||
__author__ = "Donald N. Allingham"
|
||||
@ -1035,12 +1037,19 @@ class Person(SourceNote):
|
||||
self.lds_bapt = None
|
||||
self.lds_endow = None
|
||||
self.lds_seal = None
|
||||
self.complete = 0
|
||||
|
||||
# We hold a reference to the GrampsDB so that we can maintain
|
||||
# its genderStats. It doesn't get set here, but from
|
||||
# GenderStats.count_person.
|
||||
self.db = None
|
||||
|
||||
def setComplete(self,val):
|
||||
self.complete = val
|
||||
|
||||
def getComplete(self):
|
||||
return self.complete
|
||||
|
||||
def getDisplayInfo(self):
|
||||
if self.gender == Person.male:
|
||||
gender = const.male
|
||||
|
@ -483,7 +483,11 @@ class XmlWriter:
|
||||
|
||||
def write_id(self,label,person,index=1):
|
||||
if person:
|
||||
self.g.write('%s<%s id="%s">\n' % (" "*index,label,person.getId()))
|
||||
self.g.write('%s<%s id="%s"' % (" "*index,label,person.getId()))
|
||||
comp = person.getComplete()
|
||||
if comp:
|
||||
self.g.write(' complete="1"')
|
||||
self.g.write('>\n')
|
||||
|
||||
def write_family_id(self,family,index=1):
|
||||
if family:
|
||||
|
@ -119,7 +119,7 @@
|
||||
<child>
|
||||
<widget class="GtkTable" id="table14">
|
||||
<property name="visible">True</property>
|
||||
<property name="n_rows">1</property>
|
||||
<property name="n_rows">2</property>
|
||||
<property name="n_columns">1</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="row_spacing">0</property>
|
||||
@ -1188,6 +1188,28 @@
|
||||
<property name="y_options">fill</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckButton" id="complete">
|
||||
<property name="border_width">6</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">_Information is complete</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">shrink</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
|
Loading…
Reference in New Issue
Block a user