Example #1
0
 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("")
Example #2
0
 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("")
Example #3
0
 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)
Example #4
0
 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)
Example #5
0
 def settimedeltastr(label, from_time):
     delta = datetime.timedelta(seconds=(int(time.time())-int(from_time)))
     label.set_text(str(delta))
Example #6
0
 def settimedeltastr(label, from_time):
     delta = datetime.timedelta(seconds=(int(time.time())-int(from_time)))
     label.set_text(str(delta))