sftp_utilities.py 文件源码

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

项目:king-phisher-plugins 作者: securestate 项目源码 文件源码
def get_treeview_column(name, renderer, m_col, m_col_sort=None, resizable=False):
    """
    A function used to generate a generic treeview column.

    :param str name: The name of the column.
    :param renderer: The Gtk renderer to be used for the column.
    :param m_col: The column position in the model.
    :param m_col_sort: The column to sort column data by.
    :param bool resizable: Decide whether the column should be resizable.
    :return: A TreeViewColumn Object with the desired setttings.
    """
    tv_col = Gtk.TreeViewColumn(name)
    tv_col.pack_start(renderer, True)
    tv_col.add_attribute(renderer, 'text', m_col)
    tv_col.set_property('resizable', resizable)
    if m_col_sort is not None:
        tv_col.set_sort_column_id(m_col_sort)
    return tv_col
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号