Ejemplo n.º 1
0
 def playlist_create_model(self):
     '''create the model - a ListStore'''
     data = configuration.get_sections()
     store = Gtk.ListStore(str, int)
     for item in data:
         store.append([item, 0])
     return store
Ejemplo n.º 2
0
 def create_store(self):
     store = Gtk.TreeStore(str, str)
     data_sections = configuration.get_sections()
     for section in data_sections:
         piter = store.append(None, [section, ""])
         for option in configuration.get_options(section):
             store.append(piter, [option, str(configuration.get_conf(section, option, "string"))])
     return store