X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/56caea07f8ab1ae3013617695e0613ad0bec061a..c18f141ad00ed43c69541c43d318314b5fd129b2:/wxPython/wx/tools/XRCed/xrced.py diff --git a/wxPython/wx/tools/XRCed/xrced.py b/wxPython/wx/tools/XRCed/xrced.py index 0cc4713948..7da5549984 100644 --- a/wxPython/wx/tools/XRCed/xrced.py +++ b/wxPython/wx/tools/XRCed/xrced.py @@ -100,7 +100,7 @@ class Frame(wxFrame): # Load our own resources self.res = wxXmlResource('') - # !!! Blocking of assert failure occuring in older unicode builds + # !!! Blocking of assert failure occurring in older unicode builds try: self.res.Load(os.path.join(basePath, 'xrced.xrc')) except wx._core.PyAssertionError: @@ -177,7 +177,7 @@ class Frame(wxFrame): # Create toolbar tb = self.CreateToolBar(wxTB_HORIZONTAL | wxNO_BORDER | wxTB_FLAT) tb.SetToolBitmapSize((24,24)) - new_bmp = wx.ArtProvider.GetBitmap(wx.ART_NEW, wx.ART_TOOLBAR) + new_bmp = wx.ArtProvider.GetBitmap(wx.ART_NORMAL_FILE, wx.ART_TOOLBAR) open_bmp = wx.ArtProvider.GetBitmap(wx.ART_FILE_OPEN, wx.ART_TOOLBAR) save_bmp = wx.ArtProvider.GetBitmap(wx.ART_FILE_SAVE, wx.ART_TOOLBAR) undo_bmp = wx.ArtProvider.GetBitmap(wx.ART_UNDO, wx.ART_TOOLBAR) @@ -361,7 +361,7 @@ class Frame(wxFrame): if evt.GetId() == wxID_SAVEAS or not self.dataFile: if self.dataFile: defaultName = '' else: defaultName = 'UNTITLED.xrc' - dirname = os.path.dirname(self.dataFile) + dirname = os.path.abspath(os.path.dirname(self.dataFile)) dlg = wxFileDialog(self, 'Save As', dirname, defaultName, '*.xrc', wxSAVE | wxOVERWRITE_PROMPT | wxCHANGE_DIR) if dlg.ShowModal() == wxID_OK: @@ -456,7 +456,8 @@ class Frame(wxFrame): if parent.__class__ != xxxMainNode: error = True elif x.__class__ == xxxToolBar: # Toolbar can be top-level of child of panel or frame - if parent.__class__ not in [xxxMainNode, xxxPanel, xxxFrame]: error = True + if parent.__class__ not in [xxxMainNode, xxxPanel, xxxFrame] and \ + not parent.isSizer: error = True elif x.__class__ == xxxPanel and parent.__class__ == xxxMainNode: pass elif x.__class__ == xxxSpacer: @@ -716,7 +717,6 @@ Homepage: http://xrced.sourceforge.net\ # Simple emulation of python command line def OnDebugCMD(self, evt): - import traceback while 1: try: exec raw_input('C:\> ') @@ -1033,6 +1033,8 @@ Homepage: http://xrced.sourceforge.net\ self.modified = False panel.SetModified(False) except: + inf = sys.exc_info() + wxLogError(traceback.format_exception(inf[0], inf[1], None)[-1]) wxLogError('Error writing file: %s' % path) raise