home *** CD-ROM | disk | FTP | other *** search
/ com!online 2005 April / com_0405_1.iso / opensource / BTpp-0.5.4-bin.exe / $INSTDIR / BT++.exe / DlgMain / StatusBar.pyo (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2003-04-19  |  1.2 KB  |  29 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyo (Python 2.2)
  3.  
  4. from wxPython.wx import *
  5. from TimedUpdate import TimedUpdate
  6.  
  7. class StatusBar(wxStatusBar):
  8.     
  9.     def __init__(self, parent):
  10.         wxStatusBar.__init__(self, parent, -1)
  11.         self.Parent = parent
  12.         self.SetFieldsCount(2)
  13.         self.SetStatusWidths([
  14.             -1,
  15.             160])
  16.         self.Thread = TimedUpdate(0.5, self.Update)
  17.         self.Thread.start()
  18.  
  19.     
  20.     def Update(self):
  21.         speed = self.Parent.GetSpeeds()
  22.         self.SetStatusText('Down: %.1f | Up: %.1f' % (speed[0], speed[1]), 1)
  23.  
  24.     
  25.     def Destroy(self):
  26.         self.Thread.Shutdown()
  27.  
  28.  
  29.