def add_gpg_keys_to_combo_box(combo_box, secret=False):
gpg_keys_list = Gtk.ListStore(str, str)
for key in GpgUtils.get_gpg_keys(secret):
key_id = key[0]
key_name = key[1]
gpg_keys_list.append([key_id, key_name])
cell = Gtk.CellRendererText()
combo_box.pack_start(cell, True)
combo_box.add_attribute(cell, 'text', 1)
combo_box.set_model(gpg_keys_list)
combo_box.set_entry_text_column(1)
评论列表
文章目录