def set_icon_state(self, state): self._icon_state = state if state: self.icon.set_icon(utils.get_connected_logo()) else: self.icon.set_icon(utils.get_disconnected_logo())
def update_icon(self): icon_path = utils.get_disconnected_logo() if self._cur_icon_path != icon_path: self._cur_icon_path = icon_path self.set_icon_state(self.get_icon_state())