From 1afe5bb7782d211eaf08594de05f0323bc00231a Mon Sep 17 00:00:00 2001 From: Sean Robinson Date: Sun, 28 Dec 2008 16:58:40 -0700 Subject: [PATCH] Remove configure() by moving three remaining lines to end of main --- wifi-radar | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/wifi-radar b/wifi-radar index 6ee5a0f..bae572f 100755 --- a/wifi-radar +++ b/wifi-radar @@ -1578,23 +1578,6 @@ def say( words ): os.system("%s \"%s\"" % ( confFile.get_opt('DEFAULT.speak_command'), words )) #os.spawnlp(os.P_WAIT, confFile.get_opt('DEFAULT.speak_command'), confFile.get_opt('DEFAULT.speak_command'), words) -# Configure -def configure( confFile ): - global lock - main_radar_window = radar_window(confFile) - lock = threading.RLock() - threading.Thread( None, scanning_thread, None, ( confFile, lock) ).start() - gobject.timeout_add( 500, main_radar_window.update_plist_items ) - main_radar_window.main() - - -#################################################################################################### -# Initializers -access_points = {} -auto_profile_order = [] -lock = None -s = None - # load our conf file and known profiles #################################################################################################### @@ -1679,7 +1662,6 @@ for apname in confFile.profiles(): # read the important values for key in ap.keys(): ap[key] = confFile.get_opt(apname + "." + key) - access_points[ apname ] = ap # if it is not in the auto_profile_order add it print "main: ", confFile.auto_profile_order if not apname in confFile.auto_profile_order: @@ -2147,7 +2129,6 @@ signal_low_pb = None signal_barely_pb= None signal_ok_pb = None signal_best_pb = None -exit_flag = False #################################################################################################### # Make so we can be imported @@ -2157,4 +2138,6 @@ if __name__ == "__main__": else: import gtk, gobject gtk.gdk.threads_init() - configure(confFile) + main_radar_window = radar_window(confFile) + gobject.timeout_add( 2000, main_radar_window.update_plist_items ) + main_radar_window.main() -- 2.11.4.GIT