notifications + callbacks update

This commit is contained in:
ingvar1995
2016-02-24 23:01:25 +03:00
parent 35cf74eff8
commit 632412c345
2 changed files with 23 additions and 12 deletions

View File

@ -1,5 +1,6 @@
from PySide import QtGui, QtCore
from PySide import QtGui
# TODO: add sound notifications
# TODO: add reaction om mouse move
def tray_notification(title, text):
@ -7,4 +8,6 @@ def tray_notification(title, text):
tray = QtGui.QSystemTrayIcon()
tray.setContextMenu(QtGui.QMenu())
tray.show()
tray.showMessage(title, text)
if len(text) > 50:
text = text[:50] + '...'
tray.showMessage(title, text, QtGui.QSystemTrayIcon.NoIcon, 4000)