mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-09 18:08:39 +00:00
Fix system tray locking
This commit is contained in:
parent
1209663595
commit
9b12c231da
1 changed files with 4 additions and 5 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue