Commit 97e34f7a authored by Guillaume Seguin's avatar Guillaume Seguin

Cleanup: int => boolean

parent 44ceb6ff
...@@ -1095,12 +1095,12 @@ class pronsole(cmd.Cmd): ...@@ -1095,12 +1095,12 @@ class pronsole(cmd.Cmd):
if "File selected" in l: if "File selected" in l:
self.log(_("Starting print")) self.log(_("Starting print"))
self.p.send_now("M24") self.p.send_now("M24")
self.sdprinting = 1 self.sdprinting = True
# self.recvlisteners.remove(self.waitforsdresponse) # self.recvlisteners.remove(self.waitforsdresponse)
return return
if "Done printing file" in l: if "Done printing file" in l:
self.log(l) self.log(l)
self.sdprinting = 0 self.sdprinting = False
self.recvlisteners.remove(self.waitforsdresponse) self.recvlisteners.remove(self.waitforsdresponse)
return return
if "SD printing byte" in l: if "SD printing byte" in l:
......
...@@ -1715,9 +1715,9 @@ Printrun. If not, see <http://www.gnu.org/licenses/>.""" ...@@ -1715,9 +1715,9 @@ Printrun. If not, see <http://www.gnu.org/licenses/>."""
def listfiles(self, line, ignored = False): def listfiles(self, line, ignored = False):
if "Begin file list" in line: if "Begin file list" in line:
self.sdlisting = 1 self.sdlisting = True
elif "End file list" in line: elif "End file list" in line:
self.sdlisting = 0 self.sdlisting = False
self.recvlisteners.remove(self.listfiles) self.recvlisteners.remove(self.listfiles)
wx.CallAfter(self.filesloaded) wx.CallAfter(self.filesloaded)
elif self.sdlisting: elif self.sdlisting:
...@@ -1732,13 +1732,13 @@ Printrun. If not, see <http://www.gnu.org/licenses/>.""" ...@@ -1732,13 +1732,13 @@ Printrun. If not, see <http://www.gnu.org/licenses/>."""
wx.CallAfter(self.statusbar.SetStatusText, l) wx.CallAfter(self.statusbar.SetStatusText, l)
if "File selected" in l: if "File selected" in l:
wx.CallAfter(self.statusbar.SetStatusText, _("Starting print")) wx.CallAfter(self.statusbar.SetStatusText, _("Starting print"))
self.sdprinting = 1 self.sdprinting = True
self.p.send_now("M24") self.p.send_now("M24")
self.startcb() self.startcb()
return return
if "Done printing file" in l: if "Done printing file" in l:
wx.CallAfter(self.statusbar.SetStatusText, l) wx.CallAfter(self.statusbar.SetStatusText, l)
self.sdprinting = 0 self.sdprinting = False
self.recvlisteners.remove(self.waitforsdresponse) self.recvlisteners.remove(self.waitforsdresponse)
self.endcb() self.endcb()
return return
......
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