Tryicon plugin Ayatana library fallback

This commit is contained in:
mullerdavid 2021-09-07 15:28:57 +02:00 committed by GitHub
parent 8f4b9f2b10
commit 2bc7269106
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -19,8 +19,13 @@
import datetime
import gi
gi.require_version('Gtk', '3.0')
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:
#fall back to Ayatana
gi.require_version('AyatanaAppIndicator3', '0.1')
from gi.repository import AyatanaAppIndicator3 as appindicator
from gi.repository import Gtk
import logging
from safeeyes import utility