comparison orpg/mapper/background_handler.py @ 12:c056e967907a traipse_dev

I said, 'let the users have freedom' and it was it writ in code No more stagnant directorys inside webfiles. Make your own! **webfiles is for security**
author sirebral
date Fri, 17 Jul 2009 09:03:41 -0500
parents 292e064396e4
children 0b8b7e3ed78d
comparison
equal deleted inserted replaced
11:292e064396e4 12:c056e967907a
81 else: 81 else:
82 try: 82 try:
83 min_url = open_rpg.get_component("cherrypy") + filename 83 min_url = open_rpg.get_component("cherrypy") + filename
84 except: 84 except:
85 return 85 return
86 if dlg.GetDirectory() == orpg.dirpath.dir_struct["user"]+'webfiles' + os.sep + 'Textures': 86 min_url = dlg.GetDirectory().replace(orpg.dirpath.dir_struct["user"]+'webfiles' + os.sep, open_rpg.get_component("cherrypy")) + '/' + filename
87 min_url = open_rpg.get_component("cherrypy") + 'Textures/' + filename
88 if dlg.GetDirectory() == orpg.dirpath.dir_struct["user"]+'webfiles' + os.sep + 'Maps':
89 min_url = open_rpg.get_component("cherrypy") + 'Maps/' + filename
90 if dlg.GetDirectory() == orpg.dirpath.dir_struct["user"]+'webfiles' + os.sep + 'Miniatures':
91 min_url = open_rpg.get_component("cherrypy") + 'Miniatures/' + filename
92 print min_url
93 87
94 if self.bg_type.GetStringSelection() == 'Texture': 88 if self.bg_type.GetStringSelection() == 'Texture':
95 self.canvas.layers['bg'].set_texture(str(min_url)) 89 self.canvas.layers['bg'].set_texture(min_url)
96 elif self.bg_type.GetStringSelection() == 'Image': 90 elif self.bg_type.GetStringSelection() == 'Image':
97 self.size = self.canvas.layers['bg'].set_image(str(min_url),1) 91 self.size = self.canvas.layers['bg'].set_image(min_url,1)
98 self.update_info() 92 self.update_info()
99 self.canvas.send_map_data() 93 self.canvas.send_map_data()
100 self.canvas.Refresh(False) 94 self.canvas.Refresh(False)
101 95
102 def update_info(self): 96 def update_info(self):