# HG changeset patch # User lbessard # Date 1198254353 -3600 # Node ID ad4dafe7bfeebec83ef6ade997d824e0d7202392 # Parent d7b4dd1f543f4f331cd1bd71931e6581754faffd Bugs with windows fixed diff -r d7b4dd1f543f -r ad4dafe7bfee Beremiz.py --- a/Beremiz.py Thu Dec 20 16:36:14 2007 +0100 +++ b/Beremiz.py Fri Dec 21 17:25:53 2007 +0100 @@ -347,6 +347,7 @@ else: self.AUIManager = wx.aui.AuiManager(self) self.AUIManager.SetDockSizeConstraint(0.5, 0.5) + self.Panes = {} self.PluginTree = CT.CustomTreeCtrl(id=ID_BEREMIZPLUGINTREE, name='PluginTree', parent=self, pos=wx.Point(0, 0), @@ -548,7 +549,7 @@ else: item = self.PluginTree.AppendItem(root, "") - if wx.Platform != '__WXMSW__': + if wx.Platform != '__WXMSW__' or wx.VERSION >= (2, 8, 0): item, root_cookie = self.PluginTree.GetNextChild(root, root_cookie) self.GenerateTreeBranch(item, values) item, root_cookie = self.PluginTree.GetNextChild(root, root_cookie) @@ -643,10 +644,15 @@ def RefreshPluginToolBar(self): if wx.VERSION < (2, 8, 0): self.ClearSizer(self.MenuSizer) + else: + if "ToolBar" in self.Panes: + self.AUIManager.DetachPane(self.Panes["ToolBar"]) + self.Panes["ToolBar"].Destroy() if self.PluginRoot.HasOpenedProject() and len(self.PluginRoot.PluginMethods) > 0: if wx.VERSION > (2, 8, 0): toolbar = wx.ToolBar(self, -1, wx.DefaultPosition, wx.DefaultSize, wx.TB_FLAT | wx.TB_NODIVIDER | wx.NO_BORDER | wx.TB_TEXT) + toolbar.SetToolBitmapSize(wx.Size(48, 48)) else: boxsizer = wx.BoxSizer(wx.HORIZONTAL) for plugin_infos in self.PluginRoot.PluginMethods: @@ -682,6 +688,7 @@ self.RightGridSizer.Layout() else: toolbar.Realize() + self.Panes["ToolBar"] = toolbar self.AUIManager.AddPane(toolbar, wx.aui.AuiPaneInfo(). Name("ToolBar").Caption("Toolbar"). ToolbarPane().Top(). diff -r d7b4dd1f543f -r ad4dafe7bfee plugins/__init__.py --- a/plugins/__init__.py Thu Dec 20 16:36:14 2007 +0100 +++ b/plugins/__init__.py Fri Dec 21 17:25:53 2007 +0100 @@ -2,4 +2,4 @@ _base_path = path.split(__file__)[0] -__all__ = [name for name in listdir(_base_path) if path.isdir(path.join(_base_path, name)) and name != "CVS" or name.endswith(".py") and not name.startswith("__")] +__all__ = [name for name in listdir(_base_path) if path.isdir(path.join(_base_path, name)) and name.upper() != "CVS" or name.endswith(".py") and not name.startswith("__")]