]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/wx/tools/XRCed/xrced.py
fix for toolbar items selection - impossible to find exact coordinates
[wxWidgets.git] / wxPython / wx / tools / XRCed / xrced.py
index 730bf823bad7e148bcb7247021b3f3a4df4f3f60..7da554998466a0a4e043d1928cd67b71725cbd86 100644 (file)
@@ -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: