changeset 3:28ad6bd3ac71 grumpy-goblin

Images fix did not work. Needs further testing. Moving test over to a RC trac.
author sirebral
date Tue, 14 Jul 2009 21:25:00 -0500
parents d5e81dac98ff
children 4b93aa8c46a2
files orpg/mapper/images.py orpg/orpg_version.py
diffstat 2 files changed, 6 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/orpg/mapper/images.py	Tue Jul 14 20:52:56 2009 -0500
+++ b/orpg/mapper/images.py	Tue Jul 14 21:25:00 2009 -0500
@@ -75,10 +75,10 @@
                 self.__cache[path] = (path, d[0], d[1].gettype(), None)
                 return wx.ImageFromMime(self.__cache[path][1], self.__cache[path][2]).ConvertToBitmap()
             else:
-                self.bad_url(path)
+                open_rpg.get_component('log').log("Image refused to load or URI did not reference a valid image: " + path, ORPG_GENERAL, True)
                 return None
         except IOError:
-            self.bad_url(path)
+            open_rpg.get_component('log').log("Unable to resolve/open the specified URI; image was NOT loaded: " + path, ORPG_GENERAL, True)
             return None
 
     def cleanCache(self):
@@ -117,11 +117,11 @@
                 if self.__fetching.has_key(path):
                     del self.__fetching[path]
             else:
+                open_rpg.get_component('log').log("Image refused to load or URI did not reference a valid image: " + path, ORPG_GENERAL, True)
                 self.__fetching[path] = False
-                self.bad_url(path)
         except IOError:
             self.__fetching[path] = False
-            self.bad_url(path)
+            open_rpg.get_component('log').log("Unable to resolve/open the specified URI; image was NOT laoded: " + path, ORPG_GENERAL, True)
         finally:
             self.__lock.release()
 
@@ -135,7 +135,7 @@
                     break
         except:
             self.__fetching[path] = False
-            self.bad_url(path)
+            open_rpg.get_component('log').log("Unable to resolve/open the specified URI; image was NOT loaded: " + path, ORPG_GENERAL, True)
             return 
         self.__lock.acquire()
         try:
@@ -151,13 +151,6 @@
     def _getQueue(self):
         return self.__queue
 
-#Error Messages
-    def bad_url(self, path):
-        open_rpg.get_component('log').log("Image refused to load or URL did not reference a valid image: " + path, ORPG_GENERAL, True)
-        wx.MessageBox("Image refused to load or URL did not reference a valid image: " + path)
-        return
-
-
 #Properties
     Cache = property(_getCache)
     Queue = property(_getQueue)
--- a/orpg/orpg_version.py	Tue Jul 14 20:52:56 2009 -0500
+++ b/orpg/orpg_version.py	Tue Jul 14 21:25:00 2009 -0500
@@ -4,7 +4,7 @@
 #BUILD NUMBER FORMAT: "YYMMDD-##" where ## is the incremental daily build index (if needed)
 DISTRO = "Traipse"
 DIS_VER = "Grumpy Goblin"
-BUILD = "090713-02"
+BUILD = "090714-01"
 
 # This version is for network capability.
 PROTOCOL_VERSION = "1.2"