1
0
mirror of https://github.com/gryf/wicd.git synced 2025-12-20 12:58:07 +01:00

Fixed a bug that would sometimes cause the tray icon to not display the right connection state on startup.

This commit is contained in:
imdano
2007-12-17 15:44:41 +00:00
parent 7e6f7938d5
commit da4d84b793
3 changed files with 4 additions and 7 deletions

View File

@@ -1136,8 +1136,7 @@ class ConnectionWizard(dbus.service.Object):
self.SetUseGlobalDNS(False)
self.SetGlobalDNS(False, False, False)
if config.has_option("Settings", "auto_reconnect"):
self.auto_reconnect = config.get("Settings",
"auto_reconnect")
self.auto_reconnect = config.get("Settings", "auto_reconnect")
else:
config.set("Settings", "auto_reconnect", "0")
self.auto_reconnect = False

5
gui.py
View File

@@ -896,9 +896,7 @@ class appGui:
self.windowname = "gtkbench"
self.wTree = gtk.glade.XML(gladefile)
dic = { # "on_vpn_connection" : self.on_vpn_connection,
# I don't see a function that matches this...
"refresh_clicked" : self.refresh_networks,
dic = { "refresh_clicked" : self.refresh_networks,
"quit_clicked" : self.exit,
"disconnect_clicked" : self.disconnect_wireless,
"main_exit" : self.exit,
@@ -935,6 +933,7 @@ class appGui:
self.is_visible = True
self.window.connect('delete_event', self.exit)
size = config.ReadWindowSize()
width = size[0]
height = size[1]

View File

@@ -100,7 +100,6 @@ language['connecting'] = _('Connecting...')
class TrayIcon():
def __init__(self, use_tray):
print 'Use tray:',use_tray
if USE_EGG:
self.tr = self.DapperTrayIconGUI(use_tray)
else:
@@ -118,6 +117,7 @@ class TrayIcon():
self.tried_reconnect = False
self.connection_lost_counter = 0
self.tr = tr
self.update_tray_icon()
def wired_profile_chooser(self):
"""Launch the wired profile chooser."""
@@ -397,6 +397,5 @@ def main(argv):
mainloop.run()
print 'Here.'
if __name__ == '__main__':
main(sys.argv)