diff 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
line wrap: on
line diff
--- a/orpg/mapper/background_handler.py	Fri Jul 17 01:27:26 2009 -0500
+++ b/orpg/mapper/background_handler.py	Fri Jul 17 08:13:50 2009 -0500
@@ -79,9 +79,10 @@
             if self.settings.get_setting('LocalorRemote') == 'Remote':
                 thread.start_new_thread(self.canvas.layers['bg'].upload, (postdata, dlg.GetPath(), self.bg_type.GetStringSelection()))
             else:
-                url = self.settings.get_setting('LocalImageBaseURL')
-                print dlg.GetDirectory()
-                print orpg.dirpath.dir_struct["user"]
+                try:
+                    min_url = open_rpg.get_component("cherrypy") + filename
+                except:
+                    return
                 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/'
                 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/'
                 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/'