From 92c43027c9c0255055b832976bef31ee364a818c Mon Sep 17 00:00:00 2001 From: Andrew Psaltis Date: Thu, 14 May 2009 19:19:46 -0400 Subject: [PATCH] Fixed a crash on startup. --- curses/wicd-curses.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/curses/wicd-curses.py b/curses/wicd-curses.py index 0d2e67c..f15e9e6 100755 --- a/curses/wicd-curses.py +++ b/curses/wicd-curses.py @@ -844,6 +844,7 @@ class appGUI(): # Handle keystrokes if "f8" in keys or 'Q' in keys or 'q' in keys: loop.quit() + print "blah" #return False if "f5" in keys or 'R' in keys: self.lock_screen() @@ -982,11 +983,13 @@ class appGUI(): # Resolve any "alarms" in the waiting if self.update_tag != None: gobject.source_remove(self.update_tag) - self.update_tag = gobject.timeout_add(50, \ - self.update_ui,True) + if max_wait == None: + max_wait = 50 + else: + max_wait *= 1000 - #self.update_tag = gobject.timeout_add(max_wait*1000.0, \ - # self.update_ui,from_alarm=true) + self.update_tag = gobject.timeout_add(max_wait, \ + self.update_ui,False,True) #print keys #if keys == []: # return True