comparison orpg/mapper/miniatures_msg.py @ 122:36919b8a3ef9 alpha

Traipse Alpha 'OpenRPG' {091031-00} Traipse is a distribution of OpenRPG that is designed to be easy to setup and go. Traipse also makes it easy for developers to work on code without fear of sacrifice. 'Ornery-Orc' continues the trend of 'Grumpy' and adds fixes to the code. 'Ornery-Orc's main goal is to offer more advanced features and enhance the productivity of the user. Update Summary (Cleaning up for Beta) Added Bookmarks Fix to Remote Admin Commands Minor fix to text based Server Fix to Pretty Print, from Core Fix to Splitter Nodes not being created Fix to massive amounts of images loading, from Core Added 'boot' command to remote admin Added confirmation window for sent nodes Minor changes to allow for portability to an OpenSUSE linux OS Miniatures Layer pop up box allows users to turn off Mini labels, from FlexiRPG Zoom Mouse plugin added Images added to Plugin UI Switching to Element Tree Map efficiency, from FlexiRPG Added Status Bar to Update Manager default_manifest.xml renamed to default_upmana.xml Cleaner clode for saved repositories New TrueDebug Class in orpg_log Mercurial's hgweb folder is ported to upmana Happy Halloween!
author sirebral
date Sat, 31 Oct 2009 22:07:55 -0500
parents 072ffc1d466f
children 8e07c1a2c69b
comparison
equal deleted inserted replaced
121:496dbf12a6cb 122:36919b8a3ef9
77 self.tagname = "miniatures" 77 self.tagname = "miniatures"
78 map_element_msg_base.__init__(self,reentrant_lock_object) 78 map_element_msg_base.__init__(self,reentrant_lock_object)
79 79
80 def init_from_dom(self,xml_dom): 80 def init_from_dom(self,xml_dom):
81 self.p_lock.acquire() 81 self.p_lock.acquire()
82 if xml_dom.tagName == self.tagname: 82 if xml_dom.tag == self.tagname:
83 if xml_dom.getAttributeKeys(): 83 if xml_dom.keys():
84 for k in xml_dom.getAttributeKeys(): 84 for k in xml_dom.keys():
85 self.init_prop(k,xml_dom.getAttribute(k)) 85 self.init_prop(k, xml_dom.get(k))
86 86
87 for c in xml_dom._get_childNodes(): 87 for c in xml_dom.getchildren():
88 mini = mini_msg(self.p_lock) 88 mini = mini_msg(self.p_lock)
89 try: mini.init_from_dom(c) 89 try: mini.init_from_dom(c)
90 except Exception, e: print e; continue 90 except Exception, e: print e; continue
91 id = mini.get_prop("id") 91 id = mini.get_prop("id")
92 action = mini.get_prop("action") 92 action = mini.get_prop("action")
105 raise Exception, "Error attempting to initialize a " + self.tagname + " from a non-<" + self.tagname + "/> element" 105 raise Exception, "Error attempting to initialize a " + self.tagname + " from a non-<" + self.tagname + "/> element"
106 self.p_lock.release() 106 self.p_lock.release()
107 107
108 def set_from_dom(self,xml_dom): 108 def set_from_dom(self,xml_dom):
109 self.p_lock.acquire() 109 self.p_lock.acquire()
110 if xml_dom.tagName == self.tagname: 110 if xml_dom.tag == self.tagname:
111 if xml_dom.getAttributeKeys(): 111 if xml_dom.keys():
112 for k in xml_dom.getAttributeKeys(): 112 for k in xml_dom.keys():
113 self.set_prop(k,xml_dom.getAttribute(k)) 113 self.set_prop(k,xml_dom.get(k))
114 114
115 for c in xml_dom._get_childNodes(): 115 for c in xml_dom.getchildren():
116 mini = mini_msg(self.p_lock) 116 mini = mini_msg(self.p_lock)
117 117
118 try: mini.set_from_dom(c) 118 try: mini.set_from_dom(c)
119 except Exception, e: print e; continue 119 except Exception, e: print e; continue
120 id = mini.get_prop("id") 120 id = mini.get_prop("id")