Mercurial > traipse_dev
comparison orpg/mapper/miniatures_handler.py @ 11:292e064396e4 traipse_dev
Cleans up the two handlers and removes old code. Should be prod. level now.
Build Number.
author | sirebral |
---|---|
date | Fri, 17 Jul 2009 08:34:18 -0500 |
parents | 73d9286c22cf |
children | c056e967907a |
comparison
equal
deleted
inserted
replaced
10:73d9286c22cf | 11:292e064396e4 |
---|---|
36 import xml.dom.minidom as minidom | 36 import xml.dom.minidom as minidom |
37 import wx | 37 import wx |
38 from grid import GRID_RECTANGLE | 38 from grid import GRID_RECTANGLE |
39 from grid import GRID_HEXAGON | 39 from grid import GRID_HEXAGON |
40 from grid import GRID_ISOMETRIC | 40 from grid import GRID_ISOMETRIC |
41 import os | |
41 | 42 |
42 LABEL_TOOL = wx.NewId() | 43 LABEL_TOOL = wx.NewId() |
43 LAYER_TOOL = wx.NewId() | 44 LAYER_TOOL = wx.NewId() |
44 MIN_LIST_TOOL = wx.NewId() | 45 MIN_LIST_TOOL = wx.NewId() |
45 MIN_TOOL = wx.NewId() | 46 MIN_TOOL = wx.NewId() |
162 else: | 163 else: |
163 try: | 164 try: |
164 min_url = open_rpg.get_component("cherrypy") + filename | 165 min_url = open_rpg.get_component("cherrypy") + filename |
165 except: | 166 except: |
166 return | 167 return |
167 if dlg.GetDirectory() == orpg.dirpath.dir_struct["user"]+'webfiles/Textures' or dlg.GetDirectory() == orpg.dirpath.dir_struct["user"]+'webfiles\Textures': min_url = self.settings.get_setting('LocalImageBaseURL') + 'Textures/' + filename | 168 if dlg.GetDirectory() == orpg.dirpath.dir_struct["user"]+'webfiles' + os.sep +' Textures': |
168 if dlg.GetDirectory() == orpg.dirpath.dir_struct["user"]+'webfiles/Maps' or dlg.GetDirectory() == orpg.dirpath.dir_struct["user"]+'webfiles\Maps': min_url = self.settings.get_setting('ImageServerBaseURL') + 'Maps/' + filename | 169 min_url = open_rpg.get_component("cherrypy") + 'Textures/' + filename |
169 if dlg.GetDirectory() == orpg.dirpath.dir_struct["user"]+'webfiles/Miniatures' or dlg.GetDirectory() == orpg.dirpath.dir_struct["user"]+'webfiles\Miniatures': min_url = self.settings.get_setting('LocalImageBaseURL') + 'Miniatures/' + filename | 170 if dlg.GetDirectory() == orpg.dirpath.dir_struct["user"]+'webfiles' + os.sep + 'Maps': |
171 min_url = open_rpg.get_component("cherrypy") + 'Maps/' + filename | |
172 if dlg.GetDirectory() == orpg.dirpath.dir_struct["user"]+'webfiles' + os.sep + 'Miniatures': | |
173 min_url = open_rpg.get_component("cherrypy") + 'Miniatures/' + filename | |
174 | |
170 # build url | 175 # build url |
171 if min_url == "" or min_url == "http://": | 176 if min_url == "" or min_url == "http://": |
172 return | 177 return |
173 if min_url[:7] != "http://" : | 178 if min_url[:7] != "http://" : |
174 min_url = "http://" + min_url | 179 min_url = "http://" + min_url |