X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=wifiscanner%2Fwifiscanner;h=f6e925339177632b051e5e91ad9eb52087f32b1e;hb=ea8aef1ea10f21f5e220b8bdd46ba9960a701ae4;hp=f50cc6356bc5a36d9325101595f39f02a9e106dd;hpb=c6bf366ee38c92f6f7072ff4926894d67ee0609e;p=wifihood diff --git a/wifiscanner/wifiscanner b/wifiscanner/wifiscanner index f50cc63..f6e9253 100755 --- a/wifiscanner/wifiscanner +++ b/wifiscanner/wifiscanner @@ -76,7 +76,6 @@ class AbstractWifiscanner : # Top frame creation top_frame = gtk.Frame() - self.vbox.pack_start(top_frame) hbox = gtk.HBox(homogeneous=False, spacing=0) top_frame.add(hbox) @@ -85,6 +84,8 @@ class AbstractWifiscanner : bottom_frame = gtk.Frame() self.vbox.pack_end(bottom_frame, expand=False) + self.vbox.pack_end(top_frame) + bottom_box = gtk.HBox(homogeneous=False, spacing=0) bottom_frame.add( bottom_box ) @@ -127,6 +128,10 @@ class AbstractWifiscanner : def run ( self ) : gtk.main() +def settings_cb ( widget , config ) : + wifimap.config.SettingsWindow( config ) + + if hildon : class MapWindow ( gtk.Frame ) : @@ -186,10 +191,6 @@ if hildon : menubar.show_all() - def settings_cb ( widget , config ) : - wifimap.config.SettingsWindow( config ) - - else : class MapWindow ( gtk.Frame ) : @@ -210,6 +211,8 @@ else : AbstractWifiscanner.__init__( self ) self.add(self.vbox) + self.create_menu() + self.show_all() def TextView ( self , placeholder=None ) : @@ -231,6 +234,17 @@ else : toggle_button.set_label( label ) return toggle_button + def create_menu ( self ) : + + menubar = gtk.MenuBar() + self.vbox.pack_start( menubar ) + + settings = gtk.MenuItem( "Settings" ) + settings.connect( "activate", settings_cb , self.map.config ) + menubar.append( settings ) + + menubar.show_all() + window = Wifiscanner() window.run()