* src/EditPerson.py: simpler way of handling patronymic names

based of LANG
* src/FamilyView.py: clear childlist if no spouse exists


svn: r3768
This commit is contained in:
Don Allingham 2004-11-30 03:53:51 +00:00
parent 35bc6fed1e
commit 3db3d91c2d
3 changed files with 11 additions and 7 deletions

View File

@ -1,3 +1,8 @@
2004-11-29 Don Allingham <dallingham@users.sourceforge.net>
* src/EditPerson.py: simpler way of handling patronymic names
based of LANG
* src/FamilyView.py: clear childlist if no spouse exists
2004-11-29 Alex Roitman <shura@alex.neuro.umn.edu>
* src/gramps_main.py: Support for re-building Open Recent submenu
and opening files from it.

View File

@ -85,9 +85,6 @@ pycode_tgts = [('url', 0, 0),
_use_patronymic = [
"ru","RU","ru_RU","koi8r","ru_koi8r","russian","Russian",
"ru_RU.koi8r","ru_RU.KOI8-R","ru_RU.utf8","ru_RU.UTF8",
"ru_RU.utf-8","ru_RU.UTF-8","ru_RU.iso88595","ru_RU.iso8859-5",
"ru_RU.iso-8859-5"
]
@ -98,7 +95,7 @@ _use_patronymic = [
#-------------------------------------------------------------------------
class EditPerson:
use_patronymic = os.environ.get('LANG') in _use_patronymic
use_patronymic = os.environ.get('LANG').split('.')[0] in _use_patronymic
def __init__(self,parent,person,db,callback=None):
"""Creates an edit window. Associates a person with the window."""

View File

@ -1050,6 +1050,8 @@ class FamilyView:
def display_marriage(self,family):
if not family:
self.family = None
self.child_model = DisplayModels.ChildModel([],self.parent.db)
self.child_list.set_model(self.child_model)
return
hlist = family.get_child_handle_list()
@ -1236,8 +1238,8 @@ class FamilyView:
"""makes the currently select child the active person"""
model, node = self.child_selection.get_selected()
if node:
handle = self.child_model.get_value(node,2)
child = self.parent.db.get_person_from_gramps_id(handle)
handle = self.child_model.get_value(node,_HANDLE_COL)
child = self.parent.db.get_person_from_handle(handle)
self.parent.change_active_person(child)
self.load_family()
else:
@ -1404,7 +1406,7 @@ class FamilyView:
store,node = self.child_selection.get_selected()
if not node:
return
handle = self.child_model.get_value(node,2)
handle = self.child_model.get_value(node,_HANDLE_COL)
bits_per = 8; # we're going to pass a string
data = str(('child',handle));
sel_data.set(sel_data.target, bits_per, data)