toxygen/src/notifications.py

11 lines
297 B
Python
Raw Normal View History

2016-02-24 19:38:36 +01:00
from PySide import QtGui, QtCore
# TODO: add sound notifications
def tray_notification(title, text):
if QtGui.QSystemTrayIcon.isSystemTrayAvailable():
tray = QtGui.QSystemTrayIcon()
tray.setContextMenu(QtGui.QMenu())
tray.show()
tray.showMessage(title, text)