From a86d4b66a76c32eafe2cd80e521f5b1b701ec2a3 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Fri, 17 Oct 2003 03:12:05 +0000 Subject: [PATCH] * src/FamilyView.py: fixed paths to redisplay_person_list * src/ListModel.py: convert indices to strings. Sometimes a object just doesn't work as a dictionary key * src/PeopleStore.py: modify status bar, unroll loop while adding values svn: r2262 --- src/FamilyView.py | 4 ++-- src/ListModel.py | 10 +++++----- src/PeopleStore.py | 14 ++++++-------- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/src/FamilyView.py b/src/FamilyView.py index c90856b4a..0dd415054 100644 --- a/src/FamilyView.py +++ b/src/FamilyView.py @@ -423,7 +423,7 @@ class FamilyView: else: AddSpouse.AddSpouse(self.parent.db,self.person, self.load_family, - self.parent.redisplay_person_list, + self.parent.people_view.redisplay_person_list, self.family) except: DisplayTrace.DisplayTrace() @@ -434,7 +434,7 @@ class FamilyView: try: AddSpouse.AddSpouse(self.parent.db, self.person, self.load_family, - self.parent.redisplay_person_list) + self.parent.people_view.redisplay_person_list) except: DisplayTrace.DisplayTrace() diff --git a/src/ListModel.py b/src/ListModel.py index 2521ac227..5738e91dc 100644 --- a/src/ListModel.py +++ b/src/ListModel.py @@ -187,7 +187,7 @@ class ListModel: col = col + 1 self.model.set_value(iter,col,info) if info: - self.idmap[info] = iter + self.idmap[str(info)] = iter if select: self.selection.select_iter(iter) return iter @@ -204,7 +204,7 @@ class ListModel: col = col + 1 self.model.set_value(iter,col,info) if info: - self.idmap[info] = iter + self.idmap[str(info)] = iter if select: self.sel_iter = iter self.selection.select_iter(self.sel_iter) @@ -217,7 +217,7 @@ class ListModel: col = col + 1 self.model.set_value(iter,col,info) if info: - self.idmap[info] = iter + self.idmap[str(info)] = iter if select: self.sel_iter = iter return iter @@ -230,7 +230,7 @@ class ListModel: self.model.set_value(iter,col,object) col = col + 1 if info: - self.idmap[info] = iter + self.idmap[str(info)] = iter self.model.set_value(iter,col,info) self.selection.select_iter(iter) @@ -248,7 +248,7 @@ class ListModel: def find(self,info): if info in self.idmap.keys(): - iter = self.idmap[info] + iter = self.idmap[str(info)] self.selection.select_iter(iter) def cleanup(self): diff --git a/src/PeopleStore.py b/src/PeopleStore.py index 04901f95b..34cbcd790 100644 --- a/src/PeopleStore.py +++ b/src/PeopleStore.py @@ -222,27 +222,25 @@ class PeopleStore: def expand_row(self,name,iter=None): path = self.model.get_path(self.tree_roots[name]) + self.parent.parent.status_text(_('Updating display...')) self.tree.expand_row(path,1) - self.tree.expand_row(path,1) + self.parent.parent.modify_statusbar() def fill_row(self,name,iter=None): if not iter: iter = self.tree_roots[name] child = self.model.iter_children(iter) node_list = self.tree_list[name] + if self.model.get_value(child,0) is None: self.model.remove(child) for d in self.tree_list[name]: new_iter = self.model.append(iter) - col = 0 - for o in d[:-1]: - self.model.set_value(new_iter,col,o) - col += 1 - self.model.set_value(new_iter,_BCOL,pango.WEIGHT_NORMAL) + self.model.set(new_iter,0,d[0],1,d[1],2,d[2],3,d[3],4,d[4], + 5,d[5],6,d[6],7,d[7]) self.parent.id2col[d[1]] = (self,new_iter) - self.expand_row (name, iter) - + def add(self,data,select=0): self.count = self.count + 1