move_list.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:jcchess 作者: johncheetham 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号