fanim_timeline.py 文件源码

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

项目:gimp-fanim 作者: douglasvini 项目源码 文件源码
def _setup_editbar(self):
        stock_size = gtk.ICON_SIZE_BUTTON
        edit_bar = gtk.HBox()

        b_back = Utils.button_stock(gtk.STOCK_GO_BACK,stock_size)
        b_forward = Utils.button_stock(gtk.STOCK_GO_FORWARD,stock_size)
        b_rem = Utils.button_stock(gtk.STOCK_REMOVE,stock_size)
        b_add = Utils.button_stock(gtk.STOCK_ADD,stock_size)
        b_copy = Utils.button_stock(gtk.STOCK_COPY,stock_size)

        # add to the disable on play list
        w = [b_back,b_forward,b_rem,b_add,b_copy]
        map(lambda x: self.widgets_to_disable.append(x),w)

        # connect callbacks:
        b_rem.connect("clicked",self.on_remove) # remove frame
        b_add.connect("clicked",self.on_add) # add frame
        b_copy.connect("clicked",self.on_add,True) # add frame
        b_back.connect("clicked",self.on_move,PREV)
        b_forward.connect("clicked",self.on_move,NEXT)

        # tooltips
        b_rem.set_tooltip_text("Remove a frame/layer")
        b_add.set_tooltip_text("Add a frame/layer")
        b_copy.set_tooltip_text("Duplicate the atual selected frame")
        b_back.set_tooltip_text("Move the atual selected frame backward")
        b_forward.set_tooltip_text("Move the atual selected frame forward")

        # packing everything in gbar
        map(lambda x: edit_bar.pack_start(x,False,False,0),w)

        return edit_bar
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号