Python gtk 模块,STOCK_ABOUT 实例源码

我们从Python开源项目中,提取了以下1个代码示例,用于说明如何使用gtk.STOCK_ABOUT

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

        b_about = Utils.button_stock(gtk.STOCK_ABOUT,stock_size)

        b_to_gif = Utils.button_stock(gtk.STOCK_CONVERT,stock_size)
        b_to_sprite = Utils.button_stock(gtk.STOCK_MISSING_IMAGE,stock_size)

        # TODO implement export button

        b_quit = Utils.button_stock(gtk.STOCK_QUIT,stock_size)

        # callbacks
        b_quit.connect('clicked',self.destroy)
        b_about.connect('clicked',self.on_about)

        b_to_gif.connect('clicked',self.create_formated_version,'gif')
        b_to_sprite.connect('clicked',self.create_formated_version,'spritesheet')

        # tooltips
        b_about.set_tooltip_text("About FAnim")
        b_quit.set_tooltip_text("Exit")
        b_to_gif.set_tooltip_text("Create a formated Image to export as gif animation")
        b_to_sprite.set_tooltip_text("Create a formated Image to export as spritesheet")

        # add to the disable on play list
        w = [b_about, b_to_gif,b_to_sprite, b_quit]
        map(lambda x: self.widgets_to_disable.append(x),w)

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

        return general_bar