+if hildon :
+
+ class Wifiscanner ( AbstractWifiscanner , hildon.Window ) :
+
+ def __init__ ( self ) :
+ hildon.Window.__init__( self )
+ program = hildon.Program.get_instance()
+ program.add_window(self)
+
+ AbstractWifiscanner.__init__( self )
+
+ def TextView ( self , placeholder=None ) :
+ textview = hildon.TextView()
+ if placeholder :
+ textview.set_placeholder( placeholder )
+ textview.set_editable( False )
+ textview.set_cursor_visible( False )
+ textview.modify_font( pango.FontDescription("Courier 12") )
+ return textview
+
+ def Button ( self , label="" ) :
+ button = hildon.Button(hildon.HILDON_SIZE_AUTO_WIDTH | hildon.HILDON_SIZE_FINGER_HEIGHT, hildon.BUTTON_ARRANGEMENT_VERTICAL, label)
+ return button
+
+ def CheckButton ( self , label=None ) :
+ toggle_button = hildon.CheckButton( hildon.HILDON_SIZE_AUTO_WIDTH | hildon.HILDON_SIZE_FINGER_HEIGHT )
+ if label :
+ toggle_button.set_label( label )
+ return toggle_button
+
+else :
+
+ class Wifiscanner ( AbstractWifiscanner , gtk.Window ) :
+
+ def __init__ ( self ) :
+ gtk.Window.__init__( self )
+ self.window.resize(640,400)
+
+ AbstractWifiscanner.__init__( self )
+
+ def TextView ( self , placeholder=None ) :
+ textview = gtk.TextView()
+ if placeholder :
+ textview.get_buffer().set_text( placeholder )
+ textview.set_editable( False )
+ textview.set_cursor_visible( False )
+ textview.modify_font( pango.FontDescription("Courier 12") )
+ return textview
+
+ def Button ( self , label="" ) :
+ button = gtk.Button( label )
+ return button
+
+ def CheckButton ( self , label=None ) :
+ toggle_button = gtk.CheckButton()
+ if label :
+ toggle_button.set_label( label )
+ return toggle_button
+