ui: better handling of tray icons

This commit is contained in:
Peter F. Patel-Schneider 2021-03-27 17:21:22 -04:00
parent 1d18e4d8f7
commit 68049efc41
2 changed files with 3 additions and 1 deletions

View File

@ -88,7 +88,8 @@ def _init_icon_paths():
_default_theme = Gtk.IconTheme.get_default()
for p in _look_for_application_icons():
_default_theme.prepend_search_path(p)
if p not in _default_theme.get_search_path():
_default_theme.prepend_search_path(p)
if _log.isEnabledFor(_DEBUG):
_log.debug('icon theme paths: %s', _default_theme.get_search_path())

View File

@ -181,6 +181,7 @@ try:
return icon_info.get_filename() if icon_info else icon_name
def _create(menu):
_icons._init_icon_paths()
theme_paths = Gtk.IconTheme.get_default().get_search_path()
ind = AppIndicator3.Indicator.new_with_path(