Commit 2a90d5b3 authored by Guillaume Seguin's avatar Guillaume Seguin

Rename custombuttonbuttons to custombuttons

Looks like a sed failure happened before ><
parent 48fc1e98
...@@ -944,11 +944,11 @@ Printrun. If not, see <http://www.gnu.org/licenses/>.""" ...@@ -944,11 +944,11 @@ Printrun. If not, see <http://www.gnu.org/licenses/>."""
pass pass
def cbuttons_reload(self): def cbuttons_reload(self):
allcbs = getattr(self, "custombuttonbuttons", []) allcbs = getattr(self, "custombuttons", [])
for button in allcbs: for button in allcbs:
self.centersizer.Detach(button) self.centersizer.Detach(button)
button.Destroy() button.Destroy()
self.custombuttonbuttons = [] self.custombuttons = []
custombuttons = self.custombuttons[:] + [None] custombuttons = self.custombuttons[:] + [None]
for i, btndef in enumerate(custombuttons): for i, btndef in enumerate(custombuttons):
if btndef is None: if btndef is None:
...@@ -973,7 +973,7 @@ Printrun. If not, see <http://www.gnu.org/licenses/>.""" ...@@ -973,7 +973,7 @@ Printrun. If not, see <http://www.gnu.org/licenses/>."""
if btndef is not None: if btndef is not None:
b.Bind(wx.EVT_BUTTON, self.procbutton) b.Bind(wx.EVT_BUTTON, self.procbutton)
b.Bind(wx.EVT_MOUSE_EVENTS, self.editbutton) b.Bind(wx.EVT_MOUSE_EVENTS, self.editbutton)
self.custombuttonbuttons.append(b) self.custombuttons.append(b)
if type(self.centersizer) == wx.GridBagSizer: if type(self.centersizer) == wx.GridBagSizer:
self.centersizer.Add(b, pos = (i // 4, i % 4), flag = wx.EXPAND) self.centersizer.Add(b, pos = (i // 4, i % 4), flag = wx.EXPAND)
else: else:
...@@ -1131,7 +1131,7 @@ Printrun. If not, see <http://www.gnu.org/licenses/>.""" ...@@ -1131,7 +1131,7 @@ Printrun. If not, see <http://www.gnu.org/licenses/>."""
#if self.uppersizer.GetItem(self.newbuttonbutton) is not None: #if self.uppersizer.GetItem(self.newbuttonbutton) is not None:
# self.uppersizer.SetItemMinSize(self.newbuttonbutton, obj.GetSize()) # self.uppersizer.SetItemMinSize(self.newbuttonbutton, obj.GetSize())
# self.mainsizer.Layout() # self.mainsizer.Layout()
for b in self.custombuttonbuttons: for b in self.custombuttons:
#if b.IsFrozen(): b.Thaw() #if b.IsFrozen(): b.Thaw()
if b.properties is None: if b.properties is None:
b.Enable() b.Enable()
...@@ -1161,7 +1161,7 @@ Printrun. If not, see <http://www.gnu.org/licenses/>.""" ...@@ -1161,7 +1161,7 @@ Printrun. If not, see <http://www.gnu.org/licenses/>."""
dst = None dst = None
src = self.dragging.sourcebutton src = self.dragging.sourcebutton
drg = self.dragging drg = self.dragging
for b in self.custombuttonbuttons: for b in self.custombuttons:
if b.GetScreenRect().Contains(scrpos): if b.GetScreenRect().Contains(scrpos):
dst = b dst = b
break break
...@@ -1208,7 +1208,7 @@ Printrun. If not, see <http://www.gnu.org/licenses/>.""" ...@@ -1208,7 +1208,7 @@ Printrun. If not, see <http://www.gnu.org/licenses/>."""
dst = None dst = None
src = self.dragging.sourcebutton src = self.dragging.sourcebutton
drg = self.dragging drg = self.dragging
for b in self.custombuttonbuttons: for b in self.custombuttons:
if b.GetScreenRect().Contains(scrpos): if b.GetScreenRect().Contains(scrpos):
dst = b dst = b
break break
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment