Beispiel #1
0
	def validar_ganancia(self,widget):
		self.ganancia_ok=False
		ganancia=self.entry_ganancia.get_text()
		if es_float(ganancia):
			self.entry_ganancia.set_icon_from_stock(1,gtk.STOCK_APPLY)
			self.ganancia_ok=True
		else:
			self.entry_ganancia.set_icon_from_stock(1,gtk.STOCK_DIALOG_ERROR)
		if ganancia == "":
		 self.entry_ganancia.set_property("secondary-icon-stock",None)
Beispiel #2
0
	def validar_costo(self,widget):
		self.costo_ok=False
		costo=self.entry_costo.get_text()
		if es_float(costo):
			self.entry_costo.set_icon_from_stock(1,gtk.STOCK_APPLY)
			self.costo_ok=True
		else:
			self.entry_costo.set_icon_from_stock(1,gtk.STOCK_DIALOG_ERROR)
		if costo == "":
		 self.entry_costo.set_property("secondary-icon-stock",None)