* 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:
parent
df597a0422
commit
a86d4b66a7
@ -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()
|
||||
|
||||
|
@ -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):
|
||||
|
@ -222,25 +222,23 @@ 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):
|
||||
|
Loading…
Reference in New Issue
Block a user