[X2Go-Commits] [pyhoca-gui] 01/01: pyhoca/wxgui/notify.py: Drop support for GTK2'ish pynotify. Dead upstream.
git-admin at x2go.org
git-admin at x2go.org
Wed Nov 20 07:56:59 CET 2019
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository pyhoca-gui.
commit 250b594087905031737f47060a383a3271777a17
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date: Wed Nov 20 07:52:46 2019 +0100
pyhoca/wxgui/notify.py: Drop support for GTK2'ish pynotify. Dead upstream.
---
pyhoca/wxgui/notify.py | 17 +++--------------
1 file changed, 3 insertions(+), 14 deletions(-)
diff --git a/pyhoca/wxgui/notify.py b/pyhoca/wxgui/notify.py
index 7431915..843597c 100644
--- a/pyhoca/wxgui/notify.py
+++ b/pyhoca/wxgui/notify.py
@@ -23,13 +23,7 @@ import wx
from x2go import X2GOCLIENT_OS
from x2go import log
if X2GOCLIENT_OS in ('Linux', 'Mac'):
- try:
- # try the GTK3 way for notification support first...
- from gi.repository import Notify as _Notify
- except ImportError:
- # GTK3 notifications are unavailable,
- # hopefully pynotify / GTK2-based notifications are available then...
- import pynotify as _Notify
+ from gi.repository import Notify as _Notify
import exceptions
import basepath
@@ -249,13 +243,8 @@ class libnotify_NotifierPopup(object):
try:
if not self._PyHocaGUI.disable_notifications and title and text:
- try:
- n = _Notify.Notification.new(title, text, icon)
- n.set_urgency(_Notify.Urgency.NORMAL)
- except AttributeError:
- # handle pynotify / GTK2-based notifications
- n = _Notify.Notification(title, text, icon)
- n.set_urgency(_Notify.URGENCY_NORMAL)
+ n = _Notify.Notification.new(title, text, icon)
+ n.set_urgency(_Notify.Urgency.NORMAL)
n.set_timeout(timeout)
n.show()
except:
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/pyhoca-gui.git
More information about the x2go-commits
mailing list