Tray icon click toggles window visibility
Many of the tools that place an icon in systray allow to toggle the application visibility by left-clicking on the icon. Why not follow suit?
This commit is contained in:
parent
15980877dd
commit
9886b61840
|
@ -678,6 +678,12 @@ This program is licensed under the AGPL3, see docs"""+os.sep+"agpl-3.0.txt")
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def statusicon_activate(self, widget, data = None):
|
def statusicon_activate(self, widget, data = None):
|
||||||
|
# Let's allow the tray icon to toggle window visibility, the way
|
||||||
|
# most other apps work
|
||||||
|
shown = self.window.get_property('visible')
|
||||||
|
if shown:
|
||||||
|
self.window.hide()
|
||||||
|
else:
|
||||||
self.window.show()
|
self.window.show()
|
||||||
self.window.present()
|
self.window.present()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user