* src/PersonView.py: history
* src/EditPerson.py: start the save routine. svn: r5871
This commit is contained in:
parent
8428feaf79
commit
833e5f7d96
@ -1,4 +1,6 @@
|
||||
2006-02-02 Don Allingham <don@gramps-project.org>
|
||||
* src/PersonView.py: history
|
||||
* src/EditPerson.py: start the save routine.
|
||||
* src/DdTargets.py: add support for data items in sources
|
||||
* src/EventEdit.py: use DisplayTabs
|
||||
* src/gramps.glade: New EventEditor with display tabs
|
||||
|
@ -93,7 +93,8 @@ class EditPerson(DisplayState.ManagedWindow):
|
||||
self.dd = DateHandler.displayer
|
||||
self.nd = NameDisplay.displayer
|
||||
|
||||
self.orig_handle = person.get_handle()
|
||||
self.person = person
|
||||
self.orig_handle = self.person.get_handle()
|
||||
if self.orig_handle:
|
||||
self.person = state.db.get_person_from_handle(self.orig_handle)
|
||||
|
||||
@ -173,26 +174,16 @@ class EditPerson(DisplayState.ManagedWindow):
|
||||
self.birth_ref = person.get_birth_ref()
|
||||
self.death_ref = person.get_death_ref()
|
||||
|
||||
self.pname = RelLib.Name(person.get_primary_name())
|
||||
self.pname = RelLib.Name(self.person.get_primary_name())
|
||||
|
||||
self.gender.set_active(person.get_gender())
|
||||
|
||||
self.nlist = person.get_alternate_names()[:]
|
||||
self.alist = person.get_attribute_list()[:]
|
||||
self.ulist = person.get_url_list()[:]
|
||||
self.plist = person.get_address_list()[:]
|
||||
|
||||
if person:
|
||||
self.srcreflist = person.get_source_references()
|
||||
else:
|
||||
self.srcreflist = []
|
||||
self.gender.set_active(self.person.get_gender())
|
||||
|
||||
self.place_list = self.pdmap.keys()
|
||||
self.place_list.sort()
|
||||
|
||||
build_dropdown(self.surname,self.db.get_surname_list())
|
||||
|
||||
gid = person.get_gramps_id()
|
||||
gid = self.person.get_gramps_id()
|
||||
if gid:
|
||||
self.gid.set_text(gid)
|
||||
self.gid.set_editable(True)
|
||||
@ -459,8 +450,6 @@ class EditPerson(DisplayState.ManagedWindow):
|
||||
changed = False
|
||||
name = self.person.get_primary_name()
|
||||
|
||||
#TODO#if self.complete.get_active() != self.person.get_complete_flag():
|
||||
# changed = True
|
||||
if self.private.get_active() != self.person.get_privacy():
|
||||
changed = True
|
||||
|
||||
@ -727,8 +716,6 @@ class EditPerson(DisplayState.ManagedWindow):
|
||||
|
||||
n = self.nd.display(self.person)
|
||||
|
||||
print "title",self.person.primary_name.get_title()
|
||||
|
||||
self.db.transaction_commit(trans,_("Edit Person (%s)") % n)
|
||||
self.close()
|
||||
|
||||
|
@ -415,14 +415,8 @@ class PersonView(PageView.PersonNavView):
|
||||
#self.remove_from_history(handle)
|
||||
self.dbstate.db.remove_person(handle, trans)
|
||||
|
||||
if self.uistate.phistory.index >= 0:
|
||||
handle = self.uistate.phistory.history[self.index]
|
||||
self.active_person = self.dbstate.db.get_person_from_handle(handle)
|
||||
else:
|
||||
self.dbstate.change_active_person(None)
|
||||
self.uistate.phistory.back()
|
||||
self.dbstate.db.transaction_commit(trans,_("Delete Person (%s)") % n)
|
||||
#self.redraw_histmenu()
|
||||
#self.enable_interface()
|
||||
|
||||
def build_columns(self):
|
||||
for column in self.columns:
|
||||
@ -492,7 +486,7 @@ class PersonView(PageView.PersonNavView):
|
||||
for node in handle_list:
|
||||
person = self.dbstate.db.get_person_from_handle(node)
|
||||
top = person.get_primary_name().get_group_name()
|
||||
self.model.rebuild_data(self.DataFilter)
|
||||
self.model.rebuild_data()
|
||||
if not self.model.is_visable(node):
|
||||
continue
|
||||
if (not self.model.sname_sub.has_key(top) or
|
||||
@ -520,7 +514,7 @@ class PersonView(PageView.PersonNavView):
|
||||
self.model.row_deleted(path)
|
||||
except KeyError:
|
||||
pass
|
||||
self.model.rebuild_data(self.DataFilter,skip=node)
|
||||
self.model.rebuild_data()
|
||||
|
||||
def person_updated(self,handle_list):
|
||||
for node in handle_list:
|
||||
@ -551,6 +545,7 @@ class PersonView(PageView.PersonNavView):
|
||||
# if paths same, just issue row changed signal
|
||||
|
||||
if oldpath == newpath:
|
||||
print "row change", pathval, pnode
|
||||
self.model.row_changed(pathval,pnode)
|
||||
else:
|
||||
# paths different, get the new surname list
|
||||
|
Loading…
Reference in New Issue
Block a user