I am trying to hide the `AppIndicator3.Indicator`` once is shown but so far all my tries have failed.
So far I tried to just set the instance to None
in the hope that the garbage collector would remove it and I tried to set the menu to None
.
This is how I am showing it:
def __show_app_indicator(self) -> None:
if AppIndicator3:
icon_theme = Gtk.IconTheme.get_default()
icon_name = icon_theme.lookup_icon('weather-showers-symbolic', 16, 0).get_filename()
self.__app_indicator: AppIndicator3.Indicator = AppIndicator3.Indicator \
.new(APP_ID, icon_name, AppIndicator3.IndicatorCategory.HARDWARE)
self.__app_indicator.set_status(AppIndicator3.IndicatorStatus.ACTIVE)
self.__app_indicator.set_menu(self.__app_indicator_menu)
self.__app_indicator.set_status(AppIndicator3.IndicatorStatus.PASSIVE)