From 7e18194c29c2e3220087c85bce24d3e707740b16 Mon Sep 17 00:00:00 2001 From: Dan O'Reilly Date: Fri, 13 Feb 2009 18:54:27 -0500 Subject: [PATCH] Fix bug where GUI could get stuck in the connecting state if the GUI was first opened while a connection was in progress. --- wicd/gui.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/wicd/gui.py b/wicd/gui.py index 7a40634..1f23fb8 100644 --- a/wicd/gui.py +++ b/wicd/gui.py @@ -403,8 +403,9 @@ class appGui(object): return True def _set_not_connecting_state(self): - if self.connecting and self.update_cb: - gobject.source_remove(self.update_cb) + if self.connecting: + if self.update_cb: + gobject.source_remove(self.update_cb) self.update_cb = misc.timeout_add(2, self.update_statusbar) self.connecting = False if self.pulse_active: @@ -415,8 +416,9 @@ class appGui(object): gobject.idle_add(self.status_bar.remove, 1, self.statusID) def set_connecting_state(self, info): - if not self.connecting and self.update_cb: - gobject.source_remove(self.update_cb) + if not self.connecting: + if self.update_cb: + gobject.source_remove(self.update_cb) self.update_cb = misc.timeout_add(500, self.update_statusbar, milli=True) self.connecting = True