Center list after a quick person add

svn: r1621
This commit is contained in:
Don Allingham
2003-06-01 22:46:00 +00:00
parent d21f811d0a
commit e1665b524c
4 changed files with 19 additions and 30 deletions

View File

@ -186,6 +186,11 @@ class ListModel:
col = col + 1
self.model.set_value(iter,col,info)
self.selection.select_iter(iter)
def center_selected(self):
model,iter = self.selection.get_selected()
path = model.get_path(iter)
self.tree.scroll_to_cell(path,None,gtk.TRUE,0.5,0.5)
def button_press(self,obj,event):
if event.type == gtk.gdk._2BUTTON_PRESS and event.button == 1: