Made latency labels static size to prevent shifting

Latencies displayed in the widget can be of different precisions, causing
  the widget to redraw when the precision changes. It's a little annoying.
  This makes latency precision static at 2 decimal places.
This commit is contained in:
AltF4 2014-01-04 23:01:06 -07:00
parent 2be6c388ad
commit 9df9559c9c

View File

@ -114,10 +114,10 @@ class Pinger:
label = "PING FAIL"
self.log_ping(-1)
else:
label = m.group(1)+" ms"
self.log_ping(m.group(1))
self.ind.set_label (label, "100.0 ms")
#self.ping_menu_item.set_label(out)
latency = "%.2f" % float(m.group(1))
label = latency+" ms"
self.log_ping(latency)
self.ind.set_label(label, "100.0 ms")
gobject.timeout_add_seconds(self.timeout, self.ping)
def log_ping(self, value):