Fix stausbar bug
This commit is contained in:
parent
83e97125b8
commit
bad2bf9928
2 changed files with 7 additions and 4 deletions
Binary file not shown.
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 16 KiB |
11
wireguide
11
wireguide
|
@ -51,9 +51,8 @@ class WireFrame(wx.Frame): # pylint: disable=too-many-ancestors,too-many-instan
|
|||
self.make_menu_bar()
|
||||
|
||||
# and a status bar
|
||||
self.CreateStatusBar()
|
||||
self.status = str(self.num_aconns) + " active connection(s)"
|
||||
self.SetStatusText(self.status)
|
||||
self.statusbar = self.CreateStatusBar(style = wx.BORDER_NONE)
|
||||
self.set_status()
|
||||
|
||||
self.timer = wx.Timer(self)
|
||||
self.count = 0
|
||||
|
@ -62,6 +61,10 @@ class WireFrame(wx.Frame): # pylint: disable=too-many-ancestors,too-many-instan
|
|||
self.Bind(wx.EVT_PAINT, self.timing)
|
||||
self.Show()
|
||||
|
||||
def set_status(self):
|
||||
status = str(self.num_aconns) + " active connection(s)"
|
||||
self.statusbar.SetStatusText(status)
|
||||
|
||||
def timing(self, event): # pylint: disable=unused-argument
|
||||
"""
|
||||
Start a timer
|
||||
|
@ -80,6 +83,7 @@ class WireFrame(wx.Frame): # pylint: disable=too-many-ancestors,too-many-instan
|
|||
self.num_aconns = len(self.active_conns)
|
||||
self.conns = self.get_wg_conns()
|
||||
self.num_conns = len(self.conns)
|
||||
self.set_status()
|
||||
self.write_to_sizer()
|
||||
self.count = 0
|
||||
|
||||
|
@ -125,7 +129,6 @@ class WireFrame(wx.Frame): # pylint: disable=too-many-ancestors,too-many-instan
|
|||
"Please choose a config file from the file menu (CTRL+O).")
|
||||
self.sizer.Add(hd0, 0, wx.ALIGN_CENTER)
|
||||
self.sizer.Add(missingstr, 0, wx.ALIGN_LEFT)
|
||||
|
||||
self.sizer.Layout()
|
||||
|
||||
def get_next_int_name(self):
|
||||
|
|
Loading…
Add table
Reference in a new issue