diff --git a/wxPython/wx/tools/XRCed/xrced.py b/wxPython/wx/tools/XRCed/xrced.py index e4614d4dea..f4ad0cfcfa 100644 --- a/wxPython/wx/tools/XRCed/xrced.py +++ b/wxPython/wx/tools/XRCed/xrced.py @@ -1257,7 +1257,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)) diff --git a/wxPython/wx/tools/pywxrc.py b/wxPython/wx/tools/pywxrc.py index 997e2b81d0..9093b2e125 100644 --- a/wxPython/wx/tools/pywxrc.py +++ b/wxPython/wx/tools/pywxrc.py @@ -227,7 +227,7 @@ class XmlResourceCompiler: windowClass = re.sub("^wx", "", windowClass) windowName = topWindow.getAttribute("name") - if windowClass == "Menu": + if windowClass in ["Menu", "MenuItem"]: outputList.append(self.templates.MENU_CLASS_HEADER % locals()) else: outputList.append(self.templates.CLASS_HEADER % locals())