Commit 52583643 authored by Guillaume Seguin's avatar Guillaume Seguin

Merge branch 'master' of github.com:kliment/Printrun

parents 44649c64 8c3cbe06
......@@ -1221,32 +1221,34 @@ class pronsole(cmd.Cmd):
def recvcb_actions(self, l):
if l.startswith("!!"):
self.do_pause(None)
msg = l.split(" ", 1)[1]
if self.silent is False: self.logError(msg.ljust(15))
msg = l.split(" ", 1)
if len(msg) > 1 and self.silent is False: self.logError(msg[1].ljust(15))
sys.stdout.write(self.promptf())
sys.stdout.flush()
return True
elif l.startswith("//"):
command = l.split(" ", 1)[1]
self.log(_("Received command %s") % command)
command = command.split(":")
if len(command) == 2 and command[0] == "action":
command = l.split(" ", 1)
if len(command) > 1:
command = command[1]
if command == "pause":
self.do_pause(None)
sys.stdout.write(self.promptf())
sys.stdout.flush()
return True
elif command == "resume":
self.do_resume(None)
sys.stdout.write(self.promptf())
sys.stdout.flush()
return True
elif command == "disconnect":
self.do_disconnect(None)
sys.stdout.write(self.promptf())
sys.stdout.flush()
return True
self.log(_("Received command %s") % command)
command = command.split(":")
if len(command) == 2 and command[0] == "action":
command = command[1]
if command == "pause":
self.do_pause(None)
sys.stdout.write(self.promptf())
sys.stdout.flush()
return True
elif command == "resume":
self.do_resume(None)
sys.stdout.write(self.promptf())
sys.stdout.flush()
return True
elif command == "disconnect":
self.do_disconnect(None)
sys.stdout.write(self.promptf())
sys.stdout.flush()
return True
return False
def recvcb(self, l):
......
......@@ -1676,27 +1676,29 @@ Printrun. If not, see <http://www.gnu.org/licenses/>."""
if l.startswith("!!"):
if not self.paused:
wx.CallAfter(self.pause)
msg = l.split(" ", 1)[1]
if not self.p.loud:
wx.CallAfter(self.addtexttolog, msg + "\n")
msg = l.split(" ", 1)
if len(msg) > 1 and not self.p.loud:
wx.CallAfter(self.addtexttolog, msg[1] + "\n")
return True
elif l.startswith("//"):
command = l.split(" ", 1)[1]
self.log(_("Received command %s") % command)
command = command.split(":")
if len(command) == 2 and command[0] == "action":
command = l.split(" ", 1)
if len(command) > 1:
command = command[1]
if command == "pause":
if not self.paused:
wx.CallAfter(self.pause)
return True
elif command == "resume":
if self.paused:
wx.CallAfter(self.pause)
return True
elif command == "disconnect":
wx.CallAfter(self.disconnect)
return True
self.log(_("Received command %s") % command)
command = command.split(":")
if len(command) == 2 and command[0] == "action":
command = command[1]
if command == "pause":
if not self.paused:
wx.CallAfter(self.pause)
return True
elif command == "resume":
if self.paused:
wx.CallAfter(self.pause)
return True
elif command == "disconnect":
wx.CallAfter(self.disconnect)
return True
return False
def recvcb(self, l):
......
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