hildon = False
def global_start(button, scanner, config):
- scanner.start( config.scan_period , config.store_log )
+ scanner.start( int( 1000 * config.scan_period ) , config.store_log )
if button._id :
button.disconnect( button._id )
button._id = button.connect("clicked", global_stop, scanner, config)
button.set_label("Start scanning")
-class scanner ( wifimap.ReplayScanner ) :
+class scanner ( wifimap.Scanner ) :
def scan ( self ) :
- wifimap.ReplayScanner.scan( self )
+ wifimap.Scanner.scan( self )
self.report()
def report ( self ) :
- self.status.set_label( wifimap.ReplayScanner.report(self) )
+ self.status.set_label( wifimap.Scanner.report(self) )
start, end = self.buffer.get_bounds()
self.buffer.delete( start , end )
for mac,rss in self.scanlist.iteritems() :
def __init__ ( self ) :
- _scanner = scanner( "wlan0" )
+ config = wifimap.config.Configuration( 'scanner' )
+ _scanner = scanner( config , "wlan0" )
self.connect("delete_event", gtk.main_quit, None)
scrollview = gtk.ScrolledWindow()
notebook.append_page( scrollview , gtk.Label("Scanning") )
- self.map = MapWindow()
+ self.map = MapWindow( config )
notebook.append_page( self.map , gtk.Label("Map") )
buttons = gtk.VBox(homogeneous=False, spacing=0)
# Buttons creation
button = self.Button( "Switch GPS On")
- button._id = button.connect("clicked", global_start, _scanner, self.map.config)
+ button._id = button.connect("clicked", global_start, _scanner, config)
buttons.pack_start(button, expand=False)
button_scan = self.Button( "Start scanning")
class MapWindow ( gtk.Frame ) :
def __init__(self):
- gtk.Frame.__init__( self )
+ gtk.Frame.__init__( self , config )
- self.config = wifimap.config.Configuration( 'scanner' )
+ self.config = config
self.add( wifimap.simpleMapWidget( self.config ) )
class Wifiscanner ( AbstractWifiscanner , hildon.StackableWindow ) :
class MapWindow ( gtk.Frame ) :
def __init__(self):
- gtk.Frame.__init__( self )
+ gtk.Frame.__init__( self , config )
- self.config = wifimap.config.Configuration( 'scanner' )
+ self.config = config
self.add( wifimap.simpleMapWidget( self.config , (640,400) ) )
class Wifiscanner ( AbstractWifiscanner , gtk.Window ) :