use enable/disable for pause button instead of hide/show to not interfere with custombuttons

master
Keegi 2011-08-05 01:32:22 +03:00
parent 97a530d53b
commit df81a73dcc
1 changed files with 6 additions and 6 deletions

View File

@ -131,7 +131,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
def endcb(self):
print "Print took "+str(int(time.time()-self.starttime)/60)+" minutes."
wx.CallAfter(self.pausebtn.Hide)
wx.CallAfter(self.pausebtn.Disable)
wx.CallAfter(self.printbtn.SetLabel,"Print")
@ -524,7 +524,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self.topsizer.Fit(self)
# disable all printer controls until we connect to a printer
self.pausebtn.Hide()
self.pausebtn.Disable()
for i in self.printerControls:
i.Disable()
@ -934,7 +934,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
wx.CallAfter(self.printbtn.Enable)
wx.CallAfter(self.status.SetStatusText,"Loaded "+self.filename+", %d lines"%(len(self.f),))
wx.CallAfter(self.pausebtn.Hide)
wx.CallAfter(self.pausebtn.Disable)
wx.CallAfter(self.printbtn.SetLabel,"Print")
threading.Thread(target=self.loadviz).start()
@ -981,7 +981,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self.status.SetStatusText("Loaded "+name+", %d lines"%(len(self.f),))
wx.CallAfter(self.printbtn.SetLabel, "Print")
wx.CallAfter(self.pausebtn.SetLabel, "Pause")
wx.CallAfter(self.pausebtn.Hide)
wx.CallAfter(self.pausebtn.Disable)
if self.p.online:
wx.CallAfter(self.printbtn.Enable)
threading.Thread(target=self.loadviz).start()
@ -1016,7 +1016,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
def on_startprint(self):
wx.CallAfter(self.pausebtn.SetLabel, "Pause")
wx.CallAfter(self.pausebtn.Show)
wx.CallAfter(self.pausebtn.Enable)
wx.CallAfter(self.printbtn.SetLabel, "Restart")
def endupload(self):
@ -1107,7 +1107,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
wx.CallAfter(self.connectbtn.Enable);
wx.CallAfter(self.printbtn.Disable);
wx.CallAfter(self.pausebtn.Hide);
wx.CallAfter(self.pausebtn.Disable);
for i in self.printerControls:
wx.CallAfter(i.Disable)