Fix system tray locking

This commit is contained in:
Andrew Resch 2008-07-15 07:06:41 +00:00
commit 9b12c231da

View file

@ -244,13 +244,12 @@ class SystemTray(component.Component):
def on_tray_clicked(self, icon): def on_tray_clicked(self, icon):
"""Called when the tray icon is left clicked.""" """Called when the tray icon is left clicked."""
if self.config["lock_tray"]:
if not self.unlock_tray():
return
if self.window.active(): if self.window.active():
self.window.hide() self.window.hide()
else: else:
if self.config["lock_tray"]:
if not self.unlock_tray():
return
self.window.present() self.window.present()
def on_tray_popup(self, status_icon, button, activate_time): def on_tray_popup(self, status_icon, button, activate_time):
@ -336,7 +335,7 @@ class SystemTray(component.Component):
self.build_tray_bwsetsubmenu() self.build_tray_bwsetsubmenu()
def unlock_tray(self, comingnext, is_showing_dlg=[False]): def unlock_tray(self, is_showing_dlg=[False]):
import sha import sha
log.debug("Show tray lock dialog") log.debug("Show tray lock dialog")
result = False result = False