Mercurial > traipse_dev
comparison orpg/mapper/background_handler.py @ 10:73d9286c22cf traipse_dev
Adds some superb CherryPy features! Components can be deleted now too!
author | sirebral |
---|---|
date | Fri, 17 Jul 2009 08:13:50 -0500 |
parents | 4385a7d0efd1 |
children | 292e064396e4 |
comparison
equal
deleted
inserted
replaced
9:c97c641a76fd | 10:73d9286c22cf |
---|---|
77 postdata = urllib.urlencode({'filename':filename, 'imgdata':imgdata, 'imgtype':imgtype}) | 77 postdata = urllib.urlencode({'filename':filename, 'imgdata':imgdata, 'imgtype':imgtype}) |
78 | 78 |
79 if self.settings.get_setting('LocalorRemote') == 'Remote': | 79 if self.settings.get_setting('LocalorRemote') == 'Remote': |
80 thread.start_new_thread(self.canvas.layers['bg'].upload, (postdata, dlg.GetPath(), self.bg_type.GetStringSelection())) | 80 thread.start_new_thread(self.canvas.layers['bg'].upload, (postdata, dlg.GetPath(), self.bg_type.GetStringSelection())) |
81 else: | 81 else: |
82 url = self.settings.get_setting('LocalImageBaseURL') | 82 try: |
83 print dlg.GetDirectory() | 83 min_url = open_rpg.get_component("cherrypy") + filename |
84 print orpg.dirpath.dir_struct["user"] | 84 except: |
85 return | |
85 if dlg.GetDirectory() == orpg.dirpath.dir_struct["user"]+'webfiles/Textures' or dlg.GetDirectory() == orpg.dirpath.dir_struct["user"]+'webfiles\Textures': url = self.settings.get_setting('LocalImageBaseURL') + 'Textures/' | 86 if dlg.GetDirectory() == orpg.dirpath.dir_struct["user"]+'webfiles/Textures' or dlg.GetDirectory() == orpg.dirpath.dir_struct["user"]+'webfiles\Textures': url = self.settings.get_setting('LocalImageBaseURL') + 'Textures/' |
86 if dlg.GetDirectory() == orpg.dirpath.dir_struct["user"]+'webfiles/Maps' or dlg.GetDirectory() == orpg.dirpath.dir_struct["user"]+'webfiles\Maps': url = self.settings.get_setting('LocalImageBaseURL') + 'Maps/' | 87 if dlg.GetDirectory() == orpg.dirpath.dir_struct["user"]+'webfiles/Maps' or dlg.GetDirectory() == orpg.dirpath.dir_struct["user"]+'webfiles\Maps': url = self.settings.get_setting('LocalImageBaseURL') + 'Maps/' |
87 if dlg.GetDirectory() == orpg.dirpath.dir_struct["user"]+'webfiles/Miniatures' or dlg.GetDirectory() == orpg.dirpath.dir_struct["user"]+'webfiles\Miniatures': url = self.settings.get_setting('LocalImageBaseURL') + 'Miniatures/' | 88 if dlg.GetDirectory() == orpg.dirpath.dir_struct["user"]+'webfiles/Miniatures' or dlg.GetDirectory() == orpg.dirpath.dir_struct["user"]+'webfiles\Miniatures': url = self.settings.get_setting('LocalImageBaseURL') + 'Miniatures/' |
88 path = url + filename | 89 path = url + filename |
89 if self.bg_type.GetStringSelection() == 'Texture': | 90 if self.bg_type.GetStringSelection() == 'Texture': |