equal
deleted
inserted
replaced
45 #------------------------------------------------------------------------------- |
45 #------------------------------------------------------------------------------- |
46 |
46 |
47 """ |
47 """ |
48 Format the text given with the index and subindex defined |
48 Format the text given with the index and subindex defined |
49 """ |
49 """ |
50 |
|
51 def StringFormat(text, idx, sub): |
50 def StringFormat(text, idx, sub): |
52 result = name_model.match(text) |
51 result = name_model.match(text) |
53 if result: |
52 if result: |
54 format = result.groups() |
53 format = result.groups() |
55 return format[0]%eval(format[1]) |
54 return format[0]%eval(format[1]) |
792 value = value == "True" |
791 value = value == "True" |
793 self.CurrentNode.SetEntry(index, subIndex, value) |
792 self.CurrentNode.SetEntry(index, subIndex, value) |
794 elif editor == "time": |
793 elif editor == "time": |
795 self.CurrentNode.SetEntry(index, subIndex, value) |
794 self.CurrentNode.SetEntry(index, subIndex, value) |
796 elif editor == "number": |
795 elif editor == "number": |
797 self.CurrentNode.SetEntry(index, subIndex, value) |
796 try: |
|
797 self.CurrentNode.SetEntry(index, subIndex, int(value)) |
|
798 except: |
|
799 pass |
798 elif editor == "domain": |
800 elif editor == "domain": |
799 try: |
801 try: |
800 if len(value) % 2 != 0: |
802 if len(value) % 2 != 0: |
801 value = "0" + value |
803 value = "0" + value |
802 value = value.decode('hex_codec') |
804 value = value.decode('hex_codec') |