* 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
This commit is contained in:
Don Allingham 2003-10-17 03:12:05 +00:00
parent b6efc6a3f1
commit 8df8cae9b4
3 changed files with 13 additions and 15 deletions

View File

@ -423,7 +423,7 @@ class FamilyView:
else: else:
AddSpouse.AddSpouse(self.parent.db,self.person, AddSpouse.AddSpouse(self.parent.db,self.person,
self.load_family, self.load_family,
self.parent.redisplay_person_list, self.parent.people_view.redisplay_person_list,
self.family) self.family)
except: except:
DisplayTrace.DisplayTrace() DisplayTrace.DisplayTrace()
@ -434,7 +434,7 @@ class FamilyView:
try: try:
AddSpouse.AddSpouse(self.parent.db, self.person, AddSpouse.AddSpouse(self.parent.db, self.person,
self.load_family, self.load_family,
self.parent.redisplay_person_list) self.parent.people_view.redisplay_person_list)
except: except:
DisplayTrace.DisplayTrace() DisplayTrace.DisplayTrace()

View File

@ -187,7 +187,7 @@ class ListModel:
col = col + 1 col = col + 1
self.model.set_value(iter,col,info) self.model.set_value(iter,col,info)
if info: if info:
self.idmap[info] = iter self.idmap[str(info)] = iter
if select: if select:
self.selection.select_iter(iter) self.selection.select_iter(iter)
return iter return iter
@ -204,7 +204,7 @@ class ListModel:
col = col + 1 col = col + 1
self.model.set_value(iter,col,info) self.model.set_value(iter,col,info)
if info: if info:
self.idmap[info] = iter self.idmap[str(info)] = iter
if select: if select:
self.sel_iter = iter self.sel_iter = iter
self.selection.select_iter(self.sel_iter) self.selection.select_iter(self.sel_iter)
@ -217,7 +217,7 @@ class ListModel:
col = col + 1 col = col + 1
self.model.set_value(iter,col,info) self.model.set_value(iter,col,info)
if info: if info:
self.idmap[info] = iter self.idmap[str(info)] = iter
if select: if select:
self.sel_iter = iter self.sel_iter = iter
return iter return iter
@ -230,7 +230,7 @@ class ListModel:
self.model.set_value(iter,col,object) self.model.set_value(iter,col,object)
col = col + 1 col = col + 1
if info: if info:
self.idmap[info] = iter self.idmap[str(info)] = iter
self.model.set_value(iter,col,info) self.model.set_value(iter,col,info)
self.selection.select_iter(iter) self.selection.select_iter(iter)
@ -248,7 +248,7 @@ class ListModel:
def find(self,info): def find(self,info):
if info in self.idmap.keys(): if info in self.idmap.keys():
iter = self.idmap[info] iter = self.idmap[str(info)]
self.selection.select_iter(iter) self.selection.select_iter(iter)
def cleanup(self): def cleanup(self):

View File

@ -222,25 +222,23 @@ class PeopleStore:
def expand_row(self,name,iter=None): def expand_row(self,name,iter=None):
path = self.model.get_path(self.tree_roots[name]) 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.tree.expand_row(path,1) self.parent.parent.modify_statusbar()
def fill_row(self,name,iter=None): def fill_row(self,name,iter=None):
if not iter: if not iter:
iter = self.tree_roots[name] iter = self.tree_roots[name]
child = self.model.iter_children(iter) child = self.model.iter_children(iter)
node_list = self.tree_list[name] node_list = self.tree_list[name]
if self.model.get_value(child,0) is None: if self.model.get_value(child,0) is None:
self.model.remove(child) self.model.remove(child)
for d in self.tree_list[name]: for d in self.tree_list[name]:
new_iter = self.model.append(iter) new_iter = self.model.append(iter)
col = 0 self.model.set(new_iter,0,d[0],1,d[1],2,d[2],3,d[3],4,d[4],
for o in d[:-1]: 5,d[5],6,d[6],7,d[7])
self.model.set_value(new_iter,col,o)
col += 1
self.model.set_value(new_iter,_BCOL,pango.WEIGHT_NORMAL)
self.parent.id2col[d[1]] = (self,new_iter) self.parent.id2col[d[1]] = (self,new_iter)
self.expand_row (name, iter) self.expand_row (name, iter)
def add(self,data,select=0): def add(self,data,select=0):