I'm having an issue with inserting items from existing list to combo-box, here is my code:
#retrieving data:
cursor = self.__db.cursor()
cursor.execute("select * from some_table")
#creating a list:
row = cursor.fetchone()
list = gtk.ListStore(str)
list.append([row[0]])
all_rows = cursor.fetchall()
for row in all_rows:
i = i + 1
list.append([row[0]])
#creating combo-box:
self.combo_software = gtk.combo_box_entry_new_text()
for name in list:
self.combo_software.append_text(name[0])
Well, its works fine but two last lines are completely not efficient.
How can i insert all those items with more quick way?
Many thanks