def set_sound_info(label, details, supported, prop): p = get_sound_info(supported, prop) label.set_text(p.get("state", "")) if details: d = p.get("queue.used", -1) if d>=0: details.set_text(" (buffer: %sms)" % str(d).rjust(3)) else: details.set_text("")
def set_sound_info(label, details, supported, prop): p = get_sound_info(supported, prop) label.set_text(p.get("state", "")) if details: d = p.get("queue.used_pct", -1) if d>=0: details.set_text(" (buffer: %s%%)" % str(d).rjust(3)) else: details.set_text("")
def enclabel(label, cipher): if not cipher: info = "None" else: info = str(cipher) if c.info.lower()=="ssh": info += " (%s)" % c.info if get_network_caps().get("pycrypto.fastmath", False): info += " (fastmath available)" label.set_text(info)
def settimedeltastr(label, from_time): delta = datetime.timedelta(seconds=(int(time.time())-int(from_time))) label.set_text(str(delta))