dwsnc.py 文件源码

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

项目:sc-controller 作者: kozec 项目源码 文件源码
def _headerbar(bar):
        children = [] + bar.get_children()
        pack_start = []
        pack_end = []
        for c in children:
            if child_get_property(bar, c, 'pack-type') == Gtk.PackType.END:
                bar.remove(c)
                pack_start.append(c)
            else:
                bar.remove(c)
                pack_end.append(c)
        if len(pack_end) > 1:
            c,  pack_end = pack_end[0], pack_end[1:]
            pack_end.append(c)
        if (Gtk.get_major_version(), Gtk.get_minor_version()) > (3, 10):
            # Old ubuntu has this in order, new Ubuntu has it reversed
            pack_end = reversed(pack_end)
        for c in pack_start: bar.pack_start(c)
        for c in pack_end: bar.pack_end(c)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号