gu.py 文件源码

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

项目:Solfege 作者: RannyeriDev 项目源码 文件源码
def create_stock_menu_item(stock, txt, callback, ag, accel_key, accel_mod):
    box = Gtk.HBox(False, 0)
    box.set_spacing(PAD_SMALL)
    im = Gtk.Image()
    im.set_from_stock(stock, Gtk.IconSize.MENU)
    item = Gtk.ImageMenuItem(txt)
    item.set_image(im)
    if accel_key != 0:
        item.add_accelerator('activate', ag, accel_key, accel_mod, Gtk.AccelFlags.VISIBLE)
    item.connect('activate', callback)
    return item
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号