summaryrefslogtreecommitdiff
path: root/plugins/Systray.py
blob: 33525851931635a33e8874e86ba4bab861e867fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from PyQt4 import QtGui
from clMonty import monty
from clPlugin import *
from misc import *

class pluginSystray(Plugin):
	o=None
	def __init__(self, winMain):
		Plugin.__init__(self, winMain, 'Systray')

	def _load(self):
		self.o=QtGui.QSystemTrayIcon(appIcon, self.winMain)
		self.o.show()
		self.winMain.connect(self.o, QtCore.SIGNAL('activated (QSystemTrayIcon::ActivationReason)')
			, self.onSysTrayClick)
	def _unload(self):
		self.o.hide()
	def getInfo(self):
		return "Display the montypc icon in the systray."

	def onSysTrayClick(self, reason):
		self.getWinMain().setVisible(not(self.getWinMain().isVisible()))