comparison orpg/mapper/images.py @ 88:763a04270cf6 alpha

Traipse Alpha 'OpenRPG' {090917-02} 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: 00: Adds menu changes to draw attention to important updates, errors, or other events. (image info coming soon) Traipse URL is not included in the repos tab and is set as default. 01: Fixes Copy for Windows and Linux (finally!!) users. Fixes incomplete update to Grid and List nodes. Fixes incomplete update to Chat Commands. 02: Fixes problems with Remote Image Upload. Fixes Drop and Drag of Minis to Map CherryPy can now use any image in the webfiles/ folder and sub-folders. CherryPy can now Drop and Drag Minis to the Map.
author sirebral
date Thu, 17 Sep 2009 04:44:37 -0500
parents 6226a5f9a4b3
children a647e0e8f520
comparison
equal deleted inserted replaced
87:eb1b275699c4 88:763a04270cf6
96 96
97 def flushCache(self): 97 def flushCache(self):
98 """This function will flush all images contained within the image cache.""" 98 """This function will flush all images contained within the image cache."""
99 self.__lock.acquire() 99 self.__lock.acquire()
100 try: 100 try:
101 keyList = self.__cache.keys() 101 self.__cache = {}
102 for key in keyList: del self.__cache[key] 102 self.__fetching = {}
103 finally: self.__lock.release() 103 finally:
104 urllib.urlcleanup() 104 self.__lock.release()
105 urllib.urlcleanup()
105 106
106 """Private Methods""" 107 """Private Methods"""
107 def __loadThread(self, path, image_type, imageId): 108 def __loadThread(self, path, image_type, imageId):
108 uriPath = urllib.unquote(path) 109 uriPath = urllib.unquote(path)
109 self.__lock.acquire() 110 self.__lock.acquire()
156 """Properties""" 157 """Properties"""
157 Cache = property(_getCache) 158 Cache = property(_getCache)
158 Queue = property(_getQueue) 159 Queue = property(_getQueue)
159 160
160 ImageHandler = singleton(ImageHandlerClass) 161 ImageHandler = singleton(ImageHandlerClass)
162 component.add('ImageHandler', ImageHandler)