profile settings update

This commit is contained in:
ingvar1995
2016-02-25 11:32:40 +03:00
parent 632412c345
commit 47954afc4c
3 changed files with 22 additions and 10 deletions

View File

@ -1,13 +1,14 @@
from PySide import QtGui
from util import curr_directory
# TODO: add sound notifications
# TODO: add reaction om mouse move
def tray_notification(title, text):
if QtGui.QSystemTrayIcon.isSystemTrayAvailable():
tray = QtGui.QSystemTrayIcon()
tray = QtGui.QSystemTrayIcon(QtGui.QIcon(curr_directory() + '/images/icon.png'))
tray.setContextMenu(QtGui.QMenu())
tray.show()
if len(text) > 50:
text = text[:50] + '...'
tray.showMessage(title, text, QtGui.QSystemTrayIcon.NoIcon, 4000)
if len(text) > 30:
text = text[:30] + '...'
tray.showMessage(title, text, QtGui.QSystemTrayIcon.NoIcon, 3000)