Sophie

Sophie

distrib > Mageia > 9 > armv7hl > media > core-release-src > by-pkgid > ffa2c94526a63fecff58a44fa397052b > files > 1

gcdemu-3.2.6-1.mga9.src.rpm

From 8ba984805647d1f98b8ac18d2b40d24d607992ae Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jani=20V=C3=A4limaa?= <wally@mageia.org>
Date: Thu, 6 Aug 2020 17:42:22 +0300
Subject: [PATCH] Port to Ayatana AppIndicator

---
Modified 16 Nov 2022 by daviddavid for 3.2.6 release
---
 src/gcdemu | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/gcdemu b/src/gcdemu
index 201fa49..eb6738d 100755
--- a/src/gcdemu
+++ b/src/gcdemu
@@ -47,18 +47,12 @@ from gi.repository import Notify
 
 # AppIndicator
 try:
-    gi.require_version('AppIndicator3', '0.1')
+    gi.require_version('AyatanaAppIndicator3', '0.1')
 
-    from gi.repository import AppIndicator3 as AppIndicator
+    from gi.repository import AyatanaAppIndicator3 as AppIndicator
     have_app_indicator = True
 except:
-    try:
-        gi.require_version('AyatanaAppIndicator3', '0.1')
-
-        from gi.repository import AyatanaAppIndicator3 as AppIndicator
-        have_app_indicator = True
-    except:
-        have_app_indicator = False
+    have_app_indicator = False
 
 
 # *** Globals ***
@@ -2166,8 +2160,8 @@ class gCDEmuApplication (Gtk.Application
                     parent=None,
                     message_type=Gtk.MessageType.ERROR,
                     buttons=Gtk.ButtonsType.CLOSE,
-                    text=_("Failed to load AppIndicator library!"))
-                message.set_title(_("AppIndicator not available"))
+                    text=_("Failed to load Ayatana AppIndicator library!"))
+                message.set_title(_("Ayatana AppIndicator not available"))
                 message.run()
                 message.destroy()
                 sys.exit(-1)
@@ -2177,7 +2171,7 @@ class gCDEmuApplication (Gtk.Application
             # Autodetect: if AppIndicator is available, prefer it over
             # Gtk tray
             if have_app_indicator:
-                print("AppIndicator tray icon mode")
+                print("Ayatana AppIndicator tray icon mode")
                 self.tray = gCDEmuTray_Indicator()
             else:
                 print("Gtk tray icon mode")
-- 
2.28.0