From 3db3d91c2d2c635c20baec2debe9dc6e08c064c6 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Tue, 30 Nov 2004 03:53:51 +0000 Subject: [PATCH] * src/EditPerson.py: simpler way of handling patronymic names based of LANG * src/FamilyView.py: clear childlist if no spouse exists svn: r3768 --- ChangeLog | 5 +++++ src/EditPerson.py | 5 +---- src/FamilyView.py | 8 +++++--- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index b35363312..60aad360d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-11-29 Don Allingham + * 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 * src/gramps_main.py: Support for re-building Open Recent submenu and opening files from it. diff --git a/src/EditPerson.py b/src/EditPerson.py index aad77021e..7cc73bec1 100644 --- a/src/EditPerson.py +++ b/src/EditPerson.py @@ -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.""" diff --git a/src/FamilyView.py b/src/FamilyView.py index a534e30e8..403716d6b 100644 --- a/src/FamilyView.py +++ b/src/FamilyView.py @@ -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)