Python gi.repository.GObject.TYPE_BOOLEAN Examples
The following are 1
code examples of gi.repository.GObject.TYPE_BOOLEAN().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
gi.repository.GObject
, or try the search function
.
Example #1
Source File: DenominoViso.py From addons-source with GNU General Public License v2.0 | 6 votes |
def create_lstore(self,list_of_lists): lstore_args = [] for cell in list_of_lists[0]: if type(cell) == type("string"): lstore_args.append(GObject.TYPE_STRING) elif type(cell) == type(1): lstore_args.append(GObject.TYPE_UINT) elif type(cell) == type(False): lstore_args.append(GObject.TYPE_BOOLEAN) else: raise TypeError("%s" % type(cell)) lstore = Gtk.ListStore(*lstore_args) for row in list_of_lists: iter = lstore.append() index_values = [] for i,v in enumerate(row): index_values.append(i) index_values.append(v) lstore.set(iter,*index_values) return lstore