Start childref conversion
svn: r6327
This commit is contained in:
parent
fbd8b4546c
commit
f477a3cdf3
@ -1,3 +1,6 @@
|
||||
2006-04-13 Don Allingham <don@gramps-project.org>
|
||||
* various: start childref conversion
|
||||
|
||||
2006-04-13 Martin Hawlisch <Martin.Hawlisch@gmx.de>
|
||||
* src/RelLib/*: fix different typos.
|
||||
* src/DataViews/_FamilyView.py: adapt changes in RelLib
|
||||
|
@ -466,13 +466,19 @@ class FamilyView(PageView.PersonNavView):
|
||||
|
||||
if self.show_siblings:
|
||||
active = self.dbstate.active.handle
|
||||
|
||||
child_list = [handle for handle in family.get_child_handle_list()\
|
||||
if handle != active]
|
||||
|
||||
print family.get_child_ref_list()
|
||||
|
||||
child_list = [ref.ref for ref in family.get_child_ref_list()\
|
||||
if ref.ref != active]
|
||||
|
||||
print child_list
|
||||
|
||||
label = _("Siblings")
|
||||
if child_list:
|
||||
for child in child_list:
|
||||
self.write_child(label, child)
|
||||
for child_handle in child_list:
|
||||
print child_handle
|
||||
self.write_child(label, child_handle)
|
||||
label = u""
|
||||
self.row += 1
|
||||
|
||||
@ -708,8 +714,10 @@ class FamilyView(PageView.PersonNavView):
|
||||
from Editors import EditFamily
|
||||
family = RelLib.Family()
|
||||
person = self.dbstate.active
|
||||
|
||||
family.add_child_handle(person.handle)
|
||||
|
||||
ref = RelLib.ChildRef()
|
||||
ref.ref = person.handle
|
||||
family.add_child_ref(ref)
|
||||
|
||||
try:
|
||||
EditFamily(self.dbstate, self.uistate, [], family)
|
||||
|
@ -779,3 +779,4 @@ class RepositoryModel(BaseModel):
|
||||
# except:
|
||||
# log.error("Failed to create tooltip.", exc_info=True)
|
||||
# return t
|
||||
|
||||
|
@ -1193,6 +1193,63 @@ class AddrEmbedList(EmbeddedList):
|
||||
def edit_callback(self, name):
|
||||
self.rebuild()
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
#
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class PersonRefEmbedList(EmbeddedList):
|
||||
|
||||
_HANDLE_COL = 3
|
||||
_DND_TYPE = DdTargets.ADDRESS
|
||||
|
||||
_column_names = [
|
||||
(_('Name'), 0, 250),
|
||||
(_('ID'), 1, 100),
|
||||
(_('Relationship'), 2, 100),
|
||||
]
|
||||
|
||||
def __init__(self, dbstate, uistate, track, data):
|
||||
self.data = data
|
||||
EmbeddedList.__init__(self, dbstate, uistate, track,
|
||||
_('Relationships'), PersonRefModel)
|
||||
|
||||
def get_data(self):
|
||||
return self.data
|
||||
|
||||
def column_order(self):
|
||||
return ((1, 0), (1, 1), (1, 2))
|
||||
|
||||
def add_button_clicked(self, obj):
|
||||
from Editors import EditPersonRef
|
||||
|
||||
try:
|
||||
ref = RelLib.PersonRef()
|
||||
ref.rel = _('Godfather')
|
||||
EditPersonRef(
|
||||
self.dbstate, self.uistate, self.track,
|
||||
ref, self.add_callback)
|
||||
except Errors.WindowActiveError:
|
||||
pass
|
||||
|
||||
def add_callback(self, name):
|
||||
self.get_data().append(name)
|
||||
self.rebuild()
|
||||
|
||||
def edit_button_clicked(self, obj):
|
||||
from Editors import EditPersonRef
|
||||
|
||||
try:
|
||||
ref = self.get_selected()
|
||||
EditPersonRef(
|
||||
self.dbstate, self.uistate, self.track,
|
||||
ref, self.edit_callback)
|
||||
except Errors.WindowActiveError:
|
||||
pass
|
||||
|
||||
def edit_callback(self, name):
|
||||
self.rebuild()
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -1811,14 +1868,15 @@ class ChildModel(gtk.ListStore):
|
||||
str, str, str, str, str, str, int, int)
|
||||
self.db = db
|
||||
index = 1
|
||||
for child_handle in self.get_data():
|
||||
child = db.get_person_from_handle(child_handle)
|
||||
for child_ref in self.get_data():
|
||||
print child_ref, child_ref.ref
|
||||
child = db.get_person_from_handle(child_ref.ref)
|
||||
self.append(row=[index,
|
||||
child.get_gramps_id(),
|
||||
NameDisplay.displayer.display(child),
|
||||
Utils.gender[child.get_gender()],
|
||||
self.column_father_rel(child),
|
||||
self.column_mother_rel(child),
|
||||
self.column_father_rel(child_ref),
|
||||
self.column_mother_rel(child_ref),
|
||||
self.column_birth_day(child),
|
||||
self.column_death_day(child),
|
||||
self.column_birth_place(child),
|
||||
@ -1831,21 +1889,13 @@ class ChildModel(gtk.ListStore):
|
||||
index += 1
|
||||
|
||||
def get_data(self):
|
||||
return self.family.get_child_handle_list()
|
||||
return self.family.get_child_ref_list()
|
||||
|
||||
def column_father_rel(self, data):
|
||||
fhandle = self.family.handle
|
||||
for (handle, mrel, frel) in data.get_parent_family_handle_list():
|
||||
if handle == fhandle:
|
||||
return Utils.format_child_relation(frel)
|
||||
return ""
|
||||
return Utils.format_child_relation(data.get_father_relation())
|
||||
|
||||
def column_mother_rel(self, data):
|
||||
fhandle = self.family.handle
|
||||
for (handle, mrel, frel) in data.get_parent_family_handle_list():
|
||||
if handle == fhandle:
|
||||
return Utils.format_child_relation(mrel)
|
||||
return ""
|
||||
return Utils.format_child_relation(data.get_mother_relation())
|
||||
|
||||
def column_birth_day(self, data):
|
||||
event_ref = data.get_birth_ref()
|
||||
@ -2032,6 +2082,24 @@ class AddressModel(gtk.ListStore):
|
||||
obj,
|
||||
])
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# PersonRefModel
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class PersonRefModel(gtk.ListStore):
|
||||
|
||||
def __init__(self, obj_list, db):
|
||||
gtk.ListStore.__init__(self, str, str, str, object)
|
||||
self.db = db
|
||||
for obj in obj_list:
|
||||
p = self.db.get_person_from_handle(obj.ref)
|
||||
if p:
|
||||
data = [NameDisplay.displayer.display(p), p.gramps_id, obj.rel, obj]
|
||||
else:
|
||||
data = ['unknown','unknown',obj.rel,obj]
|
||||
self.append(row=data)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# LocationModel
|
||||
|
@ -115,22 +115,22 @@ class ChildEmbedList(EmbeddedList):
|
||||
"""
|
||||
returns the index of the object within the associated data
|
||||
"""
|
||||
return self.family.get_child_handle_list().index(obj)
|
||||
return self.family.get_child_ref_list().index(obj)
|
||||
|
||||
def _find_row(self,x,y):
|
||||
row = self.tree.get_path_at_pos(x,y)
|
||||
if row == None:
|
||||
return len(self.family.get_child_handle_list())
|
||||
return len(self.family.get_child_ref_list())
|
||||
else:
|
||||
return row[0][0]
|
||||
|
||||
def _handle_drag(self, row, obj):
|
||||
self.family.get_child_handle_list().insert(row,obj)
|
||||
self.family.get_child_ref_list().insert(row,obj)
|
||||
self.changed = True
|
||||
self.rebuild()
|
||||
|
||||
def _move(self, row_from, row_to, obj):
|
||||
dlist = self.family.get_child_handle_list()
|
||||
dlist = self.family.get_child_ref_list()
|
||||
if row_from < row_to:
|
||||
dlist.insert(row_to,obj)
|
||||
del dlist[row_from]
|
||||
@ -175,7 +175,7 @@ class ChildEmbedList(EmbeddedList):
|
||||
"""
|
||||
The list is considered empty if the child list is empty.
|
||||
"""
|
||||
return len(self.family.get_child_handle_list()) == 0
|
||||
return len(self.family.get_child_ref_list()) == 0
|
||||
|
||||
def get_data(self):
|
||||
"""
|
||||
@ -204,7 +204,9 @@ class ChildEmbedList(EmbeddedList):
|
||||
EditPerson(self.dbstate,self.uistate,[],person, self.new_child_added)
|
||||
|
||||
def new_child_added(self, person):
|
||||
self.family.add_child_handle(person.get_handle())
|
||||
ref = RelLib.ChildRef()
|
||||
ref.ref = person.get_handle()
|
||||
self.family.add_child_ref(ref)
|
||||
self.rebuild()
|
||||
|
||||
def share_button_clicked(self,obj):
|
||||
@ -212,15 +214,17 @@ class ChildEmbedList(EmbeddedList):
|
||||
|
||||
# it only makes sense to skip those who are already in the family
|
||||
|
||||
skip = [self.family.get_father_handle(),
|
||||
self.family.get_mother_handle()] + self.family.get_child_handle_list()
|
||||
skip = [self.family.get_father_handle(), self.family.get_mother_handle()] + \
|
||||
[x.ref for x in self.family.get_child_ref_list() ]
|
||||
|
||||
sel = SelectPerson(self.dbstate.db, "Select Child",
|
||||
skip=[ x for x in skip if x])
|
||||
person = sel.run()
|
||||
|
||||
if person:
|
||||
self.family.add_child_handle(person.get_handle())
|
||||
ref = RelLib.ChildRef()
|
||||
ref.ref = person.get_handle()
|
||||
self.family.add_child_ref(ref)
|
||||
self.rebuild()
|
||||
|
||||
# def add_button_clicked(self,obj):
|
||||
@ -265,9 +269,9 @@ class ChildEmbedList(EmbeddedList):
|
||||
skip=[ x for x in skip if x])
|
||||
|
||||
def del_button_clicked(self,obj):
|
||||
handle = self.get_selected()
|
||||
if handle:
|
||||
self.family.remove_child_handle(handle)
|
||||
ref = self.get_selected()
|
||||
if ref:
|
||||
self.family.remove_child_ref(ref)
|
||||
self.rebuild()
|
||||
|
||||
def edit_button_clicked(self,obj):
|
||||
@ -345,7 +349,7 @@ class EditFamily(EditPrimary):
|
||||
|
||||
if self.added and self.obj.get_father_handle() == None and \
|
||||
self.obj.get_mother_handle() == None and \
|
||||
len(self.obj.get_child_handle_list()) == 1:
|
||||
len(self.obj.get_child_ref_list()) == 1:
|
||||
self.add_parent = True
|
||||
if not Config.get_family_warn():
|
||||
for i in self.hidden:
|
||||
@ -449,7 +453,9 @@ class EditFamily(EditPrimary):
|
||||
mhandle = self.obj.get_mother_handle()
|
||||
self.update_mother(mhandle)
|
||||
|
||||
self.phandles = [mhandle, fhandle] + self.obj.get_child_handle_list()
|
||||
self.phandles = [mhandle, fhandle] + \
|
||||
[ x.ref for x in self.obj.get_child_ref_list()]
|
||||
|
||||
self.phandles = [handle for handle in self.phandles if handle]
|
||||
|
||||
self.mbutton.connect('clicked',self.mother_clicked)
|
||||
@ -487,6 +493,11 @@ class EditFamily(EditPrimary):
|
||||
GalleryTab(self.dbstate, self.uistate, self.track,
|
||||
self.obj.get_media_list()))
|
||||
|
||||
self.pref_list = self._add_tab(
|
||||
notebook,
|
||||
PersonRefEmbedList(self.dbstate, self.uistate, self.track,
|
||||
self.obj.child_ref_list))
|
||||
|
||||
self.lds_list = self._add_tab(
|
||||
notebook,
|
||||
FamilyLdsEmbedList(self.dbstate,self.uistate,self.track,
|
||||
@ -541,7 +552,7 @@ class EditFamily(EditPrimary):
|
||||
data_filter = FastFemaleFilter(self.dbstate.db)
|
||||
sel = SelectPerson(self.dbstate.db, "Select Mother",
|
||||
filter=data_filter,
|
||||
skip=self.obj.get_child_handle_list())
|
||||
skip=[x.ref for x in self.obj.get_child_ref_list()])
|
||||
person = sel.run()
|
||||
|
||||
if person:
|
||||
@ -612,7 +623,7 @@ class EditFamily(EditPrimary):
|
||||
data_filter = FastMaleFilter(self.dbstate.db)
|
||||
sel = SelectPerson(self.dbstate.db, "Select Father",
|
||||
filter=data_filter,
|
||||
skip=self.obj.get_child_handle_list())
|
||||
skip=[x.ref for x in self.obj.get_child_ref_list()])
|
||||
person = sel.run()
|
||||
|
||||
if person:
|
||||
@ -636,9 +647,9 @@ class EditFamily(EditPrimary):
|
||||
common = list(mfam.intersection(ffam))
|
||||
if len(common) > 0:
|
||||
if self.add_parent:
|
||||
clist = self.obj.get_child_handle_list()
|
||||
clist = self.obj.get_child_ref_list()
|
||||
self.obj = self.dbstate.db.get_family_from_handle(common[0])
|
||||
self.obj.add_child_handle(clist[0])
|
||||
self.obj.add_child_ref(clist[0])
|
||||
self.close_window()
|
||||
try:
|
||||
EditFamily(self.dbstate,self.uistate,[],self.obj)
|
||||
@ -657,8 +668,8 @@ class EditFamily(EditPrimary):
|
||||
if fam.get_mother_handle() == None:
|
||||
self.close_window()
|
||||
try:
|
||||
clist = self.obj.get_child_handle_list()
|
||||
fam.add_child_handle(clist[-1])
|
||||
clist = self.obj.get_child_ref_list()
|
||||
fam.add_child_ref(clist[-1])
|
||||
EditFamily(self.dbstate,self.uistate,[],fam)
|
||||
except Errors.WindowActiveError:
|
||||
pass
|
||||
@ -669,8 +680,8 @@ class EditFamily(EditPrimary):
|
||||
if fam.get_father_handle() == None:
|
||||
self.close_window()
|
||||
try:
|
||||
clist = self.obj.get_child_handle_list()
|
||||
fam.add_child_handle(clist[-1])
|
||||
clist = self.obj.get_child_ref_list()
|
||||
fam.add_child_ref(clist[-1])
|
||||
EditFamily(self.dbstate,self.uistate,[],fam)
|
||||
except Errors.WindowActiveError:
|
||||
pass
|
||||
@ -769,7 +780,7 @@ class EditFamily(EditPrimary):
|
||||
def object_is_empty(self):
|
||||
return self.obj.get_father_handle() == None and \
|
||||
self.obj.get_mother_handle() == None and \
|
||||
len(self.obj.get_child_handle_list()) == 0
|
||||
len(self.obj.get_child_ref_list()) == 0
|
||||
|
||||
def save(self,*obj):
|
||||
|
||||
@ -796,14 +807,10 @@ class EditFamily(EditPrimary):
|
||||
self.db.commit_person(parent,trans)
|
||||
|
||||
# for each child, add the family handle to the child
|
||||
for handle in self.obj.get_child_handle_list():
|
||||
for ref in self.obj.get_child_ref_list():
|
||||
child = self.db.get_person_from_handle(handle)
|
||||
# fix - relationships need to be extracted from the list
|
||||
child.add_parent_family_handle(
|
||||
self.obj.handle,
|
||||
(RelLib.ChildRef.CHILD_BIRTH,''),
|
||||
(RelLib.ChildRef.CHILD_BIRTH,''),
|
||||
)
|
||||
child.add_parent_family_ref(ref)
|
||||
self.db.commit_person(child,trans)
|
||||
|
||||
self.db.add_family(self.obj,trans)
|
||||
@ -827,8 +834,8 @@ class EditFamily(EditPrimary):
|
||||
self.fix_parent_handles(original.get_mother_handle(),
|
||||
self.obj.get_mother_handle(),trans)
|
||||
|
||||
orig_set = set(original.get_child_handle_list())
|
||||
new_set = set(self.obj.get_child_handle_list())
|
||||
orig_set = set(original.get_child_ref_list())
|
||||
new_set = set(self.obj.get_child_ref_list())
|
||||
|
||||
# remove the family from children which have been removed
|
||||
for handle in orig_set.difference(new_set):
|
||||
|
@ -281,6 +281,11 @@ class EditPerson(EditPrimary):
|
||||
WebEmbedList(self.dbstate, self.uistate, self.track,
|
||||
self.obj.get_url_list()))
|
||||
|
||||
self.pref_list = self._add_tab(
|
||||
notebook,
|
||||
PersonRefEmbedList(self.dbstate, self.uistate, self.track,
|
||||
self.obj.get_person_ref_list()))
|
||||
|
||||
self.lds_list = self._add_tab(
|
||||
notebook,
|
||||
LdsEmbedList(self.dbstate, self.uistate, self.track,
|
||||
|
@ -35,4 +35,5 @@ from _EditRepoRef import *
|
||||
from _EditSource import *
|
||||
from _EditSourceRef import *
|
||||
from _EditUrl import *
|
||||
from _EditPersonRef import *
|
||||
|
||||
|
@ -2103,9 +2103,7 @@ class GedcomParser:
|
||||
break
|
||||
else:
|
||||
if ftype in rel_types:
|
||||
state.person.add_parent_family_handle(
|
||||
handle, (RelLib.ChildRef.CHILD_BIRTH,''),
|
||||
(RelLib.ChildRef.CHILD_BIRTH,''))
|
||||
state.person.add_parent_family_handle(handle)
|
||||
else:
|
||||
if state.person.get_main_parents_family_handle() == handle:
|
||||
state.person.set_main_parent_family_handle(None)
|
||||
|
@ -157,11 +157,11 @@ def importData(database, filename, callback=None,cl=0,use_trans=False):
|
||||
ErrorDialog(_("Error reading %s") % filename,
|
||||
_("The file is probably either corrupt or not a valid GRAMPS database."))
|
||||
return
|
||||
except:
|
||||
if cl:
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
os._exit(1)
|
||||
# except:
|
||||
# if cl:
|
||||
# import traceback
|
||||
# traceback.print_exc()
|
||||
# os._exit(1)
|
||||
|
||||
xml_file.close()
|
||||
|
||||
@ -274,6 +274,7 @@ class GrampsParser:
|
||||
self.gid2oid = {}
|
||||
self.gid2sid = {}
|
||||
self.gid2rid = {}
|
||||
self.childref_map = {}
|
||||
self.change = change
|
||||
self.dp = DateHandler.parser
|
||||
self.place_names = sets.Set()
|
||||
@ -846,7 +847,13 @@ class GrampsParser:
|
||||
except KeyError:
|
||||
person = self.find_person_by_gramps_id(self.map_gid(attrs["ref"]))
|
||||
handle = person_handle
|
||||
self.family.add_child_handle(handle)
|
||||
|
||||
if self.childref_map.has_key((self.family.handle,handle)):
|
||||
self.family.add_child_ref(self.childref_map[(self.family.handle,handle)])
|
||||
else:
|
||||
ref = RelLib.ChildRef()
|
||||
ref.ref = handle
|
||||
self.family.add_child_ref(ref)
|
||||
|
||||
def start_url(self,attrs):
|
||||
if not attrs.has_key("href"):
|
||||
@ -904,12 +911,20 @@ class GrampsParser:
|
||||
except KeyError:
|
||||
family = self.find_family_by_gramps_id(self.map_fid(attrs["ref"]))
|
||||
handle = family.handle
|
||||
|
||||
|
||||
mrel = _ConstXML.tuple_from_xml(_ConstXML.child_relations,
|
||||
attrs.get('mrel','Birth'))
|
||||
frel = _ConstXML.tuple_from_xml(_ConstXML.child_relations,
|
||||
attrs.get('frel','Birth'))
|
||||
self.person.add_parent_family_handle(handle,mrel,frel)
|
||||
|
||||
if mrel[0] != RelLib.ChildRef.CHILD_BIRTH or \
|
||||
frel[0] != RelLib.ChildRef.CHILD_BIRTH:
|
||||
childref = RelLib.ChildRef()
|
||||
childref.ref = self.person.handle
|
||||
childref.set_mother_relation(mrel)
|
||||
childref.set_father_relation(frel)
|
||||
self.childref_map[(handle,self.person.handle)] = childref
|
||||
self.person.add_parent_family_handle(handle)
|
||||
|
||||
def start_parentin(self,attrs):
|
||||
try:
|
||||
|
@ -140,7 +140,7 @@ class ChildRef(BaseObject,PrivacyBase,SourceBase,NoteBase,RefBase):
|
||||
|
||||
def set_father_relation(self,frel):
|
||||
"""Sets relation between the person and father"""
|
||||
self.fmrel = rel
|
||||
self.frel = frel
|
||||
|
||||
def get_father_relation(self):
|
||||
"""Returns the relation between the person and father"""
|
||||
|
@ -377,6 +377,7 @@ class Family(PrimaryObject,SourceBase,NoteBase,MediaBase,AttributeBase,
|
||||
"""
|
||||
if child_ref and not isinstance(child_ref,ChildRef):
|
||||
raise ValueError("expecting ChildRef instance")
|
||||
assert(child_ref.ref)
|
||||
self.child_ref_list.append(child_ref)
|
||||
|
||||
def remove_child_ref(self,child_ref):
|
||||
|
@ -46,6 +46,7 @@ from _ChildRef import ChildRef
|
||||
# Primary objects
|
||||
from _PrimaryObject import PrimaryObject
|
||||
from _Person import Person
|
||||
from _PersonRef import PersonRef
|
||||
from _Family import Family
|
||||
from _Event import Event
|
||||
from _Place import Place
|
||||
|
@ -16353,4 +16353,311 @@ You should select parents before adding any new information. If you select paren
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget class="GtkDialog" id="pref_edit">
|
||||
<property name="visible">True</property>
|
||||
<property name="title" translatable="yes"></property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||
<property name="modal">False</property>
|
||||
<property name="default_width">600</property>
|
||||
<property name="default_height">450</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="decorated">True</property>
|
||||
<property name="skip_taskbar_hint">False</property>
|
||||
<property name="skip_pager_hint">False</property>
|
||||
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
|
||||
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
|
||||
<property name="focus_on_map">True</property>
|
||||
<property name="urgency_hint">False</property>
|
||||
<property name="has_separator">False</property>
|
||||
<signal name="delete_event" handler="on_addr_edit_delete_event" last_modification_time="Fri, 20 Feb 2004 01:16:24 GMT"/>
|
||||
|
||||
<child internal-child="vbox">
|
||||
<widget class="GtkVBox" id="vbox124">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
|
||||
<child internal-child="action_area">
|
||||
<widget class="GtkHButtonBox" id="hbuttonbox44">
|
||||
<property name="visible">True</property>
|
||||
<property name="layout_style">GTK_BUTTONBOX_END</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="cancel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label">gtk-cancel</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<property name="response_id">-6</property>
|
||||
<signal name="clicked" handler="on_cancel_addr_clicked" object="addr_edit" last_modification_time="Fri, 20 Feb 2004 01:16:51 GMT"/>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="ok">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Accept changes and close window</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="has_default">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label">gtk-ok</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<property name="response_id">-5</property>
|
||||
<signal name="clicked" handler="on_ok_addr_clicked" last_modification_time="Fri, 20 Feb 2004 01:17:10 GMT"/>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="help">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label">gtk-help</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<property name="response_id">-11</property>
|
||||
<signal name="clicked" handler="on_help_addr_clicked" last_modification_time="Tue, 18 Nov 2003 04:04:45 GMT"/>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="pack_type">GTK_PACK_END</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkVBox" id="vbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="title">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes"></property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="justify">GTK_JUSTIFY_CENTER</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">10</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkTable" id="table73">
|
||||
<property name="border_width">12</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="n_rows">2</property>
|
||||
<property name="n_columns">7</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="row_spacing">6</property>
|
||||
<property name="column_spacing">12</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label649">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Person:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_CENTER</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</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"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label650">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Relationship:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_CENTER</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="mnemonic_widget">relationship</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</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">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkEntry" id="relationship">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="editable">True</property>
|
||||
<property name="visibility">True</property>
|
||||
<property name="max_length">0</property>
|
||||
<property name="text" translatable="yes"></property>
|
||||
<property name="has_frame">True</property>
|
||||
<property name="invisible_char">*</property>
|
||||
<property name="activates_default">False</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">6</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkToggleButton" id="private">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="relief">GTK_RELIEF_NONE</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkImage" id="image2694">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon_size">1</property>
|
||||
<property name="icon_name">gtk-dialog-authentication</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">6</property>
|
||||
<property name="right_attach">7</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options"></property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="person">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes"></property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">6</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="GtkButton" id="select">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkImage" id="image2695">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-index</property>
|
||||
<property name="icon_size">4</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">6</property>
|
||||
<property name="right_attach">7</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>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
</glade-interface>
|
||||
|
@ -143,7 +143,6 @@ class Check(Tool.Tool):
|
||||
|
||||
Tool.Tool.__init__(self, dbstate, options_class, name)
|
||||
|
||||
# def runTool(database,active_person,callback,parent=None):
|
||||
cli = uistate == None
|
||||
|
||||
if self.db.readonly:
|
||||
@ -213,7 +212,10 @@ class CheckIntegrity:
|
||||
self.progress = Utils.ProgressMeter(_('Checking database'),'')
|
||||
|
||||
def family_errors(self):
|
||||
return len(self.broken_parent_links) + len(self.broken_links) + len(self.empty_family) + len(self.duplicate_links)
|
||||
return len(self.broken_parent_links) + \
|
||||
len(self.broken_links) + \
|
||||
len(self.empty_family) + \
|
||||
len(self.duplicate_links)
|
||||
|
||||
def cleanup_duplicate_spouses(self):
|
||||
|
||||
@ -885,10 +887,11 @@ class Report(ManagedWindow.ManagedWindow):
|
||||
glade_file = base + os.sep + "summary.glade"
|
||||
topDialog = gtk.glade.XML(glade_file,"summary","gramps")
|
||||
|
||||
self.window = topDialog.get_widget("summary")
|
||||
textwindow = topDialog.get_widget("textwindow")
|
||||
textwindow.get_buffer().set_text(text)
|
||||
|
||||
Utils.set_titles(topDialog.get_widget("summary"),
|
||||
Utils.set_titles(self.window,
|
||||
topDialog.get_widget("title"),
|
||||
_("Integrity Check Results"))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user