add in_menu option to registering commands so that barcodes don't show up in the menu for parameterized methods.

workspace
Brendan Howell 4 years ago
parent 7129833254
commit 0ad4c76256

@ -88,14 +88,13 @@ class LogPrinter(logging.Handler):
def emit(self, record):
if (self.printer["inep"] is None) and (self.printer["outep"] is None):
prn = printer.Usb(self.printer["vendorid"], self.printer["productid"],
profile=self.printer["profile"])
prn = printer.Usb(self.printer["vendorid"], self.printer["productid"])
else:
prn = printer.Usb(self.printer["vendorid"],
self.printer["productid"],
in_ep=self.printer["inep"],
out_ep=self.printer["outep"],
profile=self.printer["profile"])
out_ep=self.printer["outep"])
prn.profile = self.printer["profile"]
prn.set()
msg = self.format(record)
#text = textwrap.fill(msg, width=self.printer["textwidth"])
@ -415,14 +414,13 @@ class Bureau(object):
"""
if (self.smprint["inep"] is None) and (self.smprint["outep"] is None):
prn = printer.Usb(self.smprint["vendorid"],
self.smprint["productid"],
profile=self.smprint["profile"])
self.smprint["productid"])
else:
prn = printer.Usb(self.smprint["vendorid"],
self.smprint["productid"],
in_ep=self.smprint["inep"],
out_ep=self.smprint["outep"],
profile=self.smprint["profile"])
out_ep=self.smprint["outep"])
prn.profile = self.smprint["profile"]
return prn

Loading…
Cancel
Save