rightnotebook.py 文件源码

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

项目:bokken 作者: thestr4ng3r 项目源码 文件源码
def create_tab(self, title, tab_child, icon=''):
        tab_box = Gtk.HBox(False, 3)
        close_button = Gtk.Button()

        image = Gtk.Image()
        image.set_from_stock(Gtk.STOCK_CLOSE, Gtk.IconSize.MENU)

        label = Gtk.Label(label=title)
        if icon:
            i = Gtk.Image()
            i.set_from_stock(eval('Gtk.STOCK_' + icon), Gtk.IconSize.MENU)
            tab_box.pack_start(i, False, False, 0)

        close_button.connect("clicked", self.close_tab, tab_child)
        close_button.set_image(image)
        close_button.set_relief(Gtk.ReliefStyle.NONE)
        tab_box.pack_start(label, True, True, 0)
        tab_box.pack_end(close_button, False, False, 0)

        tab_box.show_all()
        if title in ['Loading dasm...', 'Code', 'Callgraph', 'Flowgraph', 'Interactive', 'Strings', "Sections", 'Hexdump', 'Bindiff', 'File info']:
            close_button.hide()

        return tab_box
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号