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 - 0.5.0.4-2 +- Use pygobject3 libnotify bindings with wxPython/wxGTK 3 + * Mon Jan 26 2015 Orion Poplawski - 0.5.0.4-1 - Update to 0.5.0.4