Changeset View
Changeset View
Standalone View
Standalone View
files/0001-Use-AyatanaAppIndicator.patch
- This file was added.
| From 5cc9f2c6b08181237a261c8b3dfe5569f5718a89 Mon Sep 17 00:00:00 2001 | |||||
| From: Fabio Forni <livingsilver94.solus@redaril.me> | |||||
| Date: Wed, 18 Aug 2021 23:20:58 +0200 | |||||
| Subject: [PATCH] Use AyatanaAppIndicator | |||||
| --- | |||||
| lib/autokey/gtkui/notifier.py | 18 +++++++++--------- | |||||
| 1 file changed, 9 insertions(+), 9 deletions(-) | |||||
| diff --git a/lib/autokey/gtkui/notifier.py b/lib/autokey/gtkui/notifier.py | |||||
| index 62b0c21..ab5d213 100644 | |||||
| --- a/lib/autokey/gtkui/notifier.py | |||||
| +++ b/lib/autokey/gtkui/notifier.py | |||||
| @@ -21,9 +21,9 @@ import threading | |||||
| import gi | |||||
| gi.require_version('Gtk', '3.0') | |||||
| gi.require_version('Notify', '0.7') | |||||
| -gi.require_version('AppIndicator3', '0.1') | |||||
| +gi.require_version('AyatanaAppIndicator3', '0.1') | |||||
| -from gi.repository import Gtk, Gdk, Notify, AppIndicator3 | |||||
| +from gi.repository import Gtk, Gdk, Notify, AyatanaAppIndicator3 | |||||
| import gettext | |||||
| from . import popupmenu | |||||
| @@ -52,8 +52,8 @@ class IndicatorNotifier: | |||||
| self.app = autokeyApp | |||||
| self.configManager = autokeyApp.service.configManager | |||||
| - self.indicator = AppIndicator3.Indicator.new("AutoKey", cm.ConfigManager.SETTINGS[cm.NOTIFICATION_ICON], | |||||
| - AppIndicator3.IndicatorCategory.APPLICATION_STATUS) | |||||
| + self.indicator = AyatanaAppIndicator3.Indicator.new("AutoKey", cm.ConfigManager.SETTINGS[cm.NOTIFICATION_ICON], | |||||
| + AyatanaAppIndicator3.IndicatorCategory.APPLICATION_STATUS) | |||||
| self.indicator.set_attention_icon(common.ICON_FILE_NOTIFICATION_ERROR) | |||||
| self.update_visible_status() | |||||
| @@ -61,12 +61,12 @@ class IndicatorNotifier: | |||||
| def update_visible_status(self): | |||||
| if cm.ConfigManager.SETTINGS[cm.SHOW_TRAY_ICON]: | |||||
| - self.indicator.set_status(AppIndicator3.IndicatorStatus.ACTIVE) | |||||
| + self.indicator.set_status(AyatanaAppIndicator3.IndicatorStatus.ACTIVE) | |||||
| else: | |||||
| - self.indicator.set_status(AppIndicator3.IndicatorStatus.PASSIVE) | |||||
| + self.indicator.set_status(AyatanaAppIndicator3.IndicatorStatus.PASSIVE) | |||||
| def hide_icon(self): | |||||
| - self.indicator.set_status(AppIndicator3.IndicatorStatus.PASSIVE) | |||||
| + self.indicator.set_status(AyatanaAppIndicator3.IndicatorStatus.PASSIVE) | |||||
| def set_icon(self,name): | |||||
| self.indicator.set_icon(name) | |||||
| @@ -127,7 +127,7 @@ class IndicatorNotifier: | |||||
| self.show_notify(message, Gtk.STOCK_DIALOG_ERROR) | |||||
| self.last_notification_timestamp = now | |||||
| self.errorItem.show() | |||||
| - self.indicator.set_status(AppIndicator3.IndicatorStatus.ATTENTION) | |||||
| + self.indicator.set_status(AyatanaAppIndicator3.IndicatorStatus.ATTENTION) | |||||
| def show_notify(self, message, iconName): | |||||
| Gdk.threads_enter() | |||||
| @@ -158,7 +158,7 @@ class IndicatorNotifier: | |||||
| self.app.show_configure() | |||||
| def on_remove_icon(self, widget, data=None): | |||||
| - self.indicator.set_status(AppIndicator3.IndicatorStatus.PASSIVE) | |||||
| + self.indicator.set_status(AyatanaAppIndicator3.IndicatorStatus.PASSIVE) | |||||
| cm.ConfigManager.SETTINGS[cm.SHOW_TRAY_ICON] = False | |||||
| def on_destroy_and_exit(self, widget, data=None): | |||||
| -- | |||||
| 2.32.0 | |||||
Copyright © 2015-2021 Solus Project. The Solus logo is Copyright © 2016-2021 Solus Project. All Rights Reserved.