gnome_connection_manager.py 文件源码

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

项目:gnome-connection-manager 作者: mjun 项目源码 文件源码
def show_font_dialog(parent, title, button):
    if not hasattr(parent, 'dlgFont'):
        parent.dlgFont = None

    if parent.dlgFont == None:
        parent.dlgFont = gtk.FontSelectionDialog(title)
    fontsel = parent.dlgFont.fontsel
    fontsel.set_font_name(button.selected_font.to_string())    

    response = parent.dlgFont.run()

    if response == gtk.RESPONSE_OK:        
        button.selected_font = pango.FontDescription(fontsel.get_font_name())        
        button.set_label(button.selected_font.to_string())
        button.get_child().modify_font(button.selected_font)
    parent.dlgFont.hide()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号