def move_box_selection(self):
if gv.jcchess.get_stopped():
(treemodel, treeiter) = gv.gui.move_view.get_selection().get_selected()
if treeiter is not None:
k = gv.gui.movestore.get_value(treeiter,0).find(".")
nmove = int(gv.gui.movestore.get_value(treeiter,0)[0:k])
self.comments.set_moveno(nmove)
# now call a method in jcchess.py to position it at the move
# clicked on
gv.jcchess.goto_move(nmove)
path = str(nmove)
self.treeview.set_cursor(path, None,False)
GObject.idle_add(self.treeview.scroll_to_cell,path,None, False, 0,0) #arguments must be in list
else:
GObject.idle_add(gv.gui.move_view.unselect_all)
评论列表
文章目录