widgets/treestore.py
def create_rows(self, builder):
		"""
		Create a row of the tree.
		"""
		parts = builder.get_parts(self.device)

		# Build tree
		for part in parts:
			old_part = None
			labels = part[0]
			oids = part[1]
			for label, oid in zip(labels, oids):
				# Update the full OID and
				# Create an iterator, so we can check for duplicates
				if old_part is None:
					iterator = self.get_iter_first()
					full_oid = str(oid)
				else:
					iterator = self.iter_children(old_part)
					full_oid = full_oid + '.' + str(oid)
	
				match = False
				# if the tree is empty, add the item
				if iterator is None:
					old_part = self.append(old_part, [label, int(oid), full_oid ])
					continue
				else:
					# search for a match
					while iterator:
						if self.get_value(iterator, 0) == label:
							match = True
							break
						else:
							iterator = self.iter_next(iterator)
				# add the item if we didn't find a match
				if not match:
					old_part = self.append(old_part, [label, int(oid), full_oid])
				else:
					old_part = iterator

		Create a row of the tree.
		
Create a row of the tree.
Create a row of the tree .
def create_rows(self, builder):
		parts = builder.get_parts(self.device)
		for part in parts:
			old_part = None
			labels = part[0]
			oids = part[1]
			for label, oid in zip(labels, oids):
				if old_part is None:
					iterator = self.get_iter_first()
					full_oid = str(oid)
				else:
					iterator = self.iter_children(old_part)
					full_oid = full_oid + '.' + str(oid)
				match = False
				if iterator is None:
					old_part = self.append(old_part, [label, int(oid), full_oid ])
					continue
				else:
					while iterator:
						if self.get_value(iterator, 0) == label:
							match = True
							break
						else:
							iterator = self.iter_next(iterator)
				if not match:
					old_part = self.append(old_part, [label, int(oid), full_oid])
				else:
					old_part = iterator
def create_rows ( self , builder ) : parts = builder . get_parts ( self . device ) for part in parts : old_part = None labels = part [ 0 ] oids = part [ 1 ] for label , oid in zip ( labels , oids ) : if old_part is None : iterator = self . get_iter_first ( ) full_oid = str ( oid ) else : iterator = self . iter_children ( old_part ) full_oid = full_oid + '.' + str ( oid ) match = False if iterator is None : old_part = self . append ( old_part , [ label , int ( oid ) , full_oid ] ) continue else : while iterator : if self . get_value ( iterator , 0 ) == label : match = True break else : iterator = self . iter_next ( iterator ) if not match : old_part = self . append ( old_part , [ label , int ( oid ) , full_oid ] ) else : old_part = iterator
Create a row of the tree.
Create a row of the tree .
"""
		Create a row of the tree.
		""" # Build tree # Update the full OID and # Create an iterator, so we can check for duplicates # if the tree is empty, add the item # search for a match # add the item if we didn't find a match
self
builder