def __init__(self, *args, **kwargs):
StatusIcon.__init__(self, *args, **kwargs)
try:
from gi.repository import AppIndicator3 as appindicator
self._status_active = appindicator.IndicatorStatus.ACTIVE
self._status_passive = appindicator.IndicatorStatus.PASSIVE
except ImportError:
log.warning("Failed to import AppIndicator3")
raise NotImplementedError
category = appindicator.IndicatorCategory.APPLICATION_STATUS
# Whatever icon is set here will be used as a tooltip icon during the entire time to icon is shown
self._tray = appindicator.Indicator.new("syncthing-gtk", self._get_icon(), category)
self._tray.set_menu(self._get_popupmenu())
self._tray.set_title(self.TRAY_TITLE)
评论列表
文章目录