]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/wx/tools/XRCed/xrced.py
Compile fixes for Panther
[wxWidgets.git] / wxPython / wx / tools / XRCed / xrced.py
index 4d9c55aa224855613a3049b162821611e645b67b..e47b62f287be10d9ebc04a6e03964e9268d3719b 100644 (file)
@@ -373,6 +373,8 @@ class Frame(wx.Frame):
                                wx.SAVE | wx.OVERWRITE_PROMPT | wx.CHANGE_DIR)
             if dlg.ShowModal() == wx.ID_OK:
                 path = dlg.GetPath()
+                if isinstance(path, unicode):
+                    path = path.encode(sys.getfilesystemencoding())
                 dlg.Destroy()
             else:
                 dlg.Destroy()
@@ -427,7 +429,7 @@ class Frame(wx.Frame):
         try:
             import wx.tools.pywxrc
             rescomp = wx.tools.pywxrc.XmlResourceCompiler()
-            rescomp.MakePythonModule(dataFile, pypath, embed, genGettext)
+            rescomp.MakePythonModule([dataFile], pypath, embed, genGettext)
         except:
             inf = sys.exc_info()
             wx.LogError(traceback.format_exception(inf[0], inf[1], None)[-1])
@@ -1257,7 +1259,7 @@ class PythonOptions(wx.Dialog):
         if self.cfg.Read("filename", "") != "":
             self.FileNameTC.SetValue(self.cfg.Read("filename"))
         else:
-            name = os.path.splitext(dataFile)[0]
+            name = os.path.splitext(os.path.split(dataFile)[1])[0]
             name += '_xrc.py'
             self.FileNameTC.SetValue(name)
         self.AutoGenerateCB.SetValue(self.cfg.ReadBool("autogenerate", False))