main_window.py 文件源码

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

项目:MokaPlayer 作者: vedard 项目源码 文件源码
def __init_txt_goto(self):
        completion = Gtk.EntryCompletion()
        store = Gtk.ListStore(str)

        artists_name = {x.Name for x in ArtistsPlaylist().collections()}
        albums_name = {x.Name for x in AlbumsPlaylist().collections()}

        for x in artists_name.union(albums_name):
            store.append([x])

        completion.set_model(store)
        completion.set_text_column(0)
        completion.set_inline_completion(True)
        completion.set_match_func(self.__txt_goto_match_func)
        completion.set_inline_selection(True)
        completion.connect('match_selected', lambda x, y, z: self.__manage_goto())
        self.txt_goto.set_completion(completion)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号