From: Roman Rolinsky Date: Wed, 9 May 2007 00:31:05 +0000 (+0000) Subject: use Tango icons on MAC & MSW; X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/690a4c0a9bc58e61d24261751fb9ed5d3409cf4d use Tango icons on MAC & MSW; process UPDATE_UI for move and refresh buttons git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45903 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/wxPython/wx/tools/XRCed/xrced.py b/wxPython/wx/tools/XRCed/xrced.py index 4945d3dde8..d7493cf8c6 100644 --- a/wxPython/wx/tools/XRCed/xrced.py +++ b/wxPython/wx/tools/XRCed/xrced.py @@ -226,7 +226,7 @@ class Frame(wx.Frame): tb.AddSeparator = _AddSeparator # Use tango icons and slightly wider bitmap size on Mac - if wx.Platform == '__WXMAC__': + if wx.Platform in ['__WXMAC__', '__WXMSW__']: tb.SetToolBitmapSize((26,26)) new_bmp = images.getNewBitmap() open_bmp = images.getOpenBitmap() @@ -266,13 +266,13 @@ class Frame(wx.Frame): tb.AddSimpleTool(self.ID_AUTO_REFRESH, images.getAutoRefreshBitmap(), 'Auto-refresh', 'Toggle auto-refresh mode', True) tb.AddSeparator() - tb.AddSimpleTool(self.ID_MOVEUP, images.getToolMoveUpBitmap(), + tb.AddSimpleTool(self.ID_MOVEUP, images.getMoveUpBitmap(), 'Up', 'Move before previous sibling') - tb.AddSimpleTool(self.ID_MOVEDOWN, images.getToolMoveDownBitmap(), + tb.AddSimpleTool(self.ID_MOVEDOWN, images.getMoveDownBitmap(), 'Down', 'Move after next sibling') - tb.AddSimpleTool(self.ID_MOVELEFT, images.getToolMoveLeftBitmap(), + tb.AddSimpleTool(self.ID_MOVELEFT, images.getMoveLeftBitmap(), 'Make Sibling', 'Make sibling of parent') - tb.AddSimpleTool(self.ID_MOVERIGHT, images.getToolMoveRightBitmap(), + tb.AddSimpleTool(self.ID_MOVERIGHT, images.getMoveRightBitmap(), 'Make Child', 'Make child of previous sibling') tb.ToggleTool(self.ID_AUTO_REFRESH, conf.autoRefresh) tb.Realize() @@ -326,6 +326,10 @@ class Frame(wx.Frame): wx.EVT_UPDATE_UI(self, wx.ID_REDO, self.OnUpdateUI) wx.EVT_UPDATE_UI(self, self.ID_DELETE, self.OnUpdateUI) wx.EVT_UPDATE_UI(self, self.ID_TEST, self.OnUpdateUI) + wx.EVT_UPDATE_UI(self, self.ID_MOVEUP, self.OnUpdateUI) + wx.EVT_UPDATE_UI(self, self.ID_MOVEDOWN, self.OnUpdateUI) + wx.EVT_UPDATE_UI(self, self.ID_MOVELEFT, self.OnUpdateUI) + wx.EVT_UPDATE_UI(self, self.ID_MOVERIGHT, self.OnUpdateUI) wx.EVT_UPDATE_UI(self, self.ID_REFRESH, self.OnUpdateUI) # Build interface @@ -1365,9 +1369,12 @@ Homepage: http://xrced.sourceforge.net\ evt.Enable(self.modified) elif evt.GetId() in [wx.ID_PASTE, self.ID_TOOL_PASTE]: evt.Enable(tree.selection is not None) - elif evt.GetId() == self.ID_TEST: + elif evt.GetId() in [self.ID_TEST, + self.ID_MOVEUP, self.ID_MOVEDOWN, + self.ID_MOVELEFT, self.ID_MOVERIGHT]: evt.Enable(tree.selection is not None and tree.selection != tree.root) - elif evt.GetId() in [self.ID_LOCATE, self.ID_TOOL_LOCATE]: + elif evt.GetId() in [self.ID_LOCATE, self.ID_TOOL_LOCATE, + self.ID_REFRESH]: evt.Enable(g.testWin is not None) elif evt.GetId() == wx.ID_UNDO: evt.Enable(undoMan.CanUndo()) elif evt.GetId() == wx.ID_REDO: evt.Enable(undoMan.CanRedo())