Skip to content

Commit

Permalink
Support libayatana-appindicator as libappindicator is now dead (#9)
Browse files Browse the repository at this point in the history
* Support libayatana-appindicator as libappindicator is now dead

It seems to be a drop-in replacement.

---------

Co-authored-by: Martin <[email protected]>
  • Loading branch information
chewi and C0rn3j authored Aug 21, 2024
1 parent fdb3685 commit 2ec0571
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions scc/gui/statusicon.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,15 @@ def __init__(self, *args, **kwargs):
StatusIcon.__init__(self, *args, **kwargs)

try:
from gi.repository import AppIndicator3 as appindicator

import gi
try:
gi.require_version("AyatanaAppIndicator3", "0.1")
from gi.repository import AyatanaAppIndicator3 as appindicator
except ImportError:
log.warning("Failed to import AyatanaAppIndicator3, trying fallback to an old implementation of AppIndicator3!")
gi.require_version("AppIndicator3", "0.1")
from gi.repository import AppIndicator3 as appindicator

self._status_active = appindicator.IndicatorStatus.ACTIVE
self._status_passive = appindicator.IndicatorStatus.PASSIVE
except ImportError:
Expand Down

0 comments on commit 2ec0571

Please sign in to comment.