Changeset View
Changeset View
Standalone View
Standalone View
files/0001-Use-libayatana-appindicator.patch
- This file was added.
| From a58466b0db6e645db6bb0f799ad1b6649bf6705e Mon Sep 17 00:00:00 2001 | |||||
| From: Gavin Zhao <gavinzhaojw@protonmail.com> | |||||
| Date: Sun, 24 Oct 2021 19:58:06 -0400 | |||||
| Subject: [PATCH] Use libayatana-appindicator | |||||
| This lets the program use `libayatana-appindicator` when it cannot | |||||
| find `libappindicator`. This fixes the issue of the disappearing of | |||||
| the tray icon. | |||||
| --- | |||||
| protonvpn_gui/view/indicator.py | 8 ++++++-- | |||||
| 1 file changed, 6 insertions(+), 2 deletions(-) | |||||
| diff --git a/protonvpn_gui/view/indicator.py b/protonvpn_gui/view/indicator.py | |||||
| index b76787f..037c4ed 100644 | |||||
| --- a/protonvpn_gui/view/indicator.py | |||||
| +++ b/protonvpn_gui/view/indicator.py | |||||
| @@ -103,8 +103,12 @@ class ProtonVPNIndicator(MetaIndicator): | |||||
| ERROR_PATH = os.path.join(ICON_DIR_PATH, VPN_TRAY_ERROR) | |||||
| def __init__(self, application): | |||||
| - gi.require_version("AppIndicator3", "0.1") | |||||
| - from gi.repository import AppIndicator3 as appindicator | |||||
| + try: | |||||
| + gi.require_version("AppIndicator3", "0.1") | |||||
| + from gi.repository import AppIndicator3 as appindicator | |||||
| + except ValueError: | |||||
| + gi.require_version("AyatanaAppIndicator3", "0.1") | |||||
| + from gi.repository import AyatanaAppIndicator3 as appindicator | |||||
| self.setup_reply_subject() | |||||
| self.__application = application | |||||
| self.__generate_menu() | |||||
| -- | |||||
| 2.32.0 | |||||
Copyright © 2015-2021 Solus Project. The Solus logo is Copyright © 2016-2021 Solus Project. All Rights Reserved.