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)
评论列表
文章目录