Fix bug in system tray menu when enabling system tray when connected to

a core
This commit is contained in:
Andrew Resch 2008-11-27 04:17:11 +00:00
parent 1515636ef3
commit 013e9d95f1
1 changed files with 8 additions and 2 deletions

View File

@ -117,7 +117,11 @@ class SystemTray(component.Component):
for widget in self.hide_widget_list:
self.tray_glade.get_widget(widget).hide()
def start(self):
if client.connected():
# We're connected so we need to get some values from the core
self.__start()
def __start(self):
if self.config["enable_system_tray"]:
# Show widgets in the hide list because we've connected to a host
for widget in self.hide_widget_list:
@ -133,6 +137,9 @@ class SystemTray(component.Component):
self._on_max_upload_speed, "max_upload_speed")
self.send_status_request()
def start(self):
self.__start()
def stop(self):
try:
# Hide widgets in hide list because we're not connected to a host
@ -379,4 +386,3 @@ window, please enter your password"))
is_showing_dlg[0] = False
return result