[X2Go-Commits] [pyhoca-gui] 01/03: Add version check with gi.require_version for Notify GIR.

git-admin at x2go.org git-admin at x2go.org
Wed Dec 11 10:55:26 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 6c5353b1d3bbe121f7a4036f0798d9bf9d27df0a
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Wed Dec 11 08:35:52 2019 +0100

    Add version check with gi.require_version for Notify GIR.
---
 debian/changelog       | 1 +
 pyhoca/__init__.py     | 1 -
 pyhoca/wxgui/notify.py | 2 ++
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index e683572..fd24dca 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,7 @@ pyhoca-gui (0.6.0.0-0x2go1) UNRELEASED; urgency=medium
       code run on wx3 and wx4.
     - Port to wxPython 4.0.x.
     - __future__ imports need to be at the very top of a .py file.
+    - Add version check with gi.require_version for Notify GIR.
   * debian/control:
     + Switch from Py2 to Py3 (B-Ds and Ds).
     + Bump DH compat level to version 9.
diff --git a/pyhoca/__init__.py b/pyhoca/__init__.py
index 23741de..9de2c23 100644
--- a/pyhoca/__init__.py
+++ b/pyhoca/__init__.py
@@ -18,4 +18,3 @@
 # along with this program; if not, write to the
 # Free Software Foundation, Inc.,
 # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
-
diff --git a/pyhoca/wxgui/notify.py b/pyhoca/wxgui/notify.py
index 3970f64..40e9783 100644
--- a/pyhoca/wxgui/notify.py
+++ b/pyhoca/wxgui/notify.py
@@ -25,6 +25,8 @@ from x2go import log
 if X2GOCLIENT_OS in ('Linux', 'Mac'):
     try:
         # try the GTK3 way for notification support first...
+        from gi import require_version
+        require_version('Notify', '0.7')
         from gi.repository import Notify as _Notify
     except ImportError:
         # GTK3 notifications are unavailable,

--
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