orion pushed to pyhoca-gui (f22). "Use pygobject3 libnotify bindings with wxPython/wxGTK 3"
notifications at fedoraproject.org
notifications at fedoraproject.org
Tue May 26 17:25:07 UTC 2015
From 0d945d86eaaf75a4f32ce588a01fc2f6bc53f82c Mon Sep 17 00:00:00 2001
From: Orion Poplawski <orion at cora.nwra.com>
Date: Tue, 26 May 2015 11:24:20 -0600
Subject: Use pygobject3 libnotify bindings with wxPython/wxGTK 3
diff --git a/pyhoca-gui-notify.patch b/pyhoca-gui-notify.patch
new file mode 100644
index 0000000..b015ca8
--- /dev/null
+++ b/pyhoca-gui-notify.patch
@@ -0,0 +1,33 @@
+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:
diff --git a/pyhoca-gui.spec b/pyhoca-gui.spec
index 5a86c1f..9a80df8 100644
--- a/pyhoca-gui.spec
+++ b/pyhoca-gui.spec
@@ -1,12 +1,16 @@
Name: pyhoca-gui
Version: 0.5.0.4
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Graphical X2Go client written in (wx)Python
Group: Applications/Communications
License: AGPLv3+
URL: http://www.x2go.org/
Source0: http://code.x2go.org/releases/source/%{name}/%{name}-%{version}.tar.gz
+# Use pygobject3 libnotify bindings with wxPython 3.0
+# http://bugs.x2go.org/cgi-bin/bugreport.cgi?bug=769
+# https://bugzilla.redhat.com/show_bug.cgi?id=1225142
+Patch0: pyhoca-gui-notify.patch
BuildArch: noarch
BuildRequires: python2-devel
@@ -23,7 +27,12 @@ Requires: python-cups
%endif
Requires: python-setproctitle
Requires: python-x2go >= 0.5.0.0
+%if 0%{?fedora} >= 22
+Requires: libnotify
+Requires: pygobject3-base
+%else
Requires: notify-python
+%endif
Requires: wxPython
%description
@@ -42,6 +51,9 @@ notification area and allows multiple X2Go session handling.
%prep
%setup -q
+%if 0%{?fedora} >= 22
+%patch0 -p1 -b .notify
+%endif
%build
@@ -82,6 +94,9 @@ fi
%changelog
+* Tue May 26 2015 Orion Poplawski <orion at cora.nwra.com> - 0.5.0.4-2
+- Use pygobject3 libnotify bindings with wxPython/wxGTK 3
+
* Mon Jan 26 2015 Orion Poplawski <orion at cora.nwra.com> - 0.5.0.4-1
- Update to 0.5.0.4
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/pyhoca-gui.git/commit/?h=f22&id=0d945d86eaaf75a4f32ce588a01fc2f6bc53f82c
More information about the scm-commits
mailing list