diff --git a/pyhoca/wxgui/notify.py b/pyhoca/wxgui/notify.py
index bc49028..85f0d52 100644
--- a/pyhoca/wxgui/notify.py
+++ b/pyhoca/wxgui/notify.py
@@ -22,7 +22,7 @@ import wx
from x2go import X2GOCLIENT_OS
from x2go import log
if X2GOCLIENT_OS in ('Linux', 'Mac'):
- import pynotify
+ from gi.repository import Notify
import exceptions
import basepath
@@ -52,7 +52,7 @@ class libnotify_NotifierPopup(object):
self._PyHocaGUI = _PyHocaGUI
self._pyhoca_logger = self._PyHocaGUI._pyhoca_logger
- if not pynotify.init("PyHocaGUI"):
+ if not Notify.init("PyHocaGUI"):
raise NotSupportedException
def prepare(self, context, title=None, text=None, icon=None, timeout=None):
@@ -132,8 +132,8 @@ class libnotify_NotifierPopup(object):
try:
if not self._PyHocaGUI.disable_notifications and title and text:
- n = pynotify.Notification(title, text, icon)
- n.set_urgency(pynotify.URGENCY_NORMAL)
+ n = Notify.Notification.new(title, text, icon)
+ n.set_urgency(Notify.Urgency.NORMAL)
n.set_timeout(timeout)
n.show()
except: