[gnome-tweaks/rff-fix-notify] Allow to use either Notify 0.7 or 0.8




commit b8548bd82f5692a23ec4f25351d0041c8faf7b1e
Author: Rafael Fontenelle <rffontenelle gmail com>
Date:   Fri Jul 15 15:12:53 2022 +0000

    Allow to use either Notify 0.7 or 0.8

 gtweak/utils.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gtweak/utils.py b/gtweak/utils.py
index 1dadbbc..e16a0c7 100644
--- a/gtweak/utils.py
+++ b/gtweak/utils.py
@@ -12,7 +12,10 @@ import itertools
 import logging
 
 import gi
-gi.require_version("Notify", "0.7")
+try:
+    gi.require_version("Notify", "0.7")
+except ValueError:
+    gi.require_version("Notify", "0.8")
 from gi.repository import GObject
 from gi.repository import GLib
 from gi.repository import Gio


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]