Fix system tray locking

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

View File

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