class AnimatedTaskBarIcon(TaskBarIconBase): def __init__(self, id=DEFAULT_TASKBAR_ID): TaskBarIconBase.__init__(self, id) self.icons = [None] self.delays = [1000] self.animation = Animation() self.animation.add_listener(self._update_tray) self._tooltip = '' def SetTooltip(self, tooltip): if tooltip != self._tooltip: self._tooltip = tooltip self._update_tray() def UpdateAnimation(self, tooltip=None): if tooltip is not None: assert isinstance(tooltip, basestring) self._tooltip = tooltip self.animation.set_frames(self.icons, self.delays) def _update_tray(self): if not wx.IsDestroyed(self): self._icon = self.animation.current_frame self.SetIcon(self._icon, self._tooltip) def GetIcon(self): return self._icon
class AnimatedTaskBarIcon(TaskBarIconBase): def __init__(self, id = DEFAULT_TASKBAR_ID): TaskBarIconBase.__init__(self, id) self.icons = [None] self.delays = [1000] self.animation = Animation() self.animation.add_listener(self._update_tray) self._tooltip = '' def SetTooltip(self, tooltip): if tooltip != self._tooltip: self._tooltip = tooltip self._update_tray() def UpdateAnimation(self, tooltip = None): if tooltip is not None: assert isinstance(tooltip, basestring) self._tooltip = tooltip self.animation.set_frames(self.icons, self.delays) def _update_tray(self): if not wx.IsDestroyed(self): self._icon = self.animation.current_frame self.SetIcon(self._icon, self._tooltip) def GetIcon(self): return self._icon
def __init__(self, id=DEFAULT_TASKBAR_ID): TaskBarIconBase.__init__(self, id) self.icons = [None] self.delays = [1000] self.animation = Animation() self.animation.add_listener(self._update_tray) self._tooltip = ''
def __init__(self, id = DEFAULT_TASKBAR_ID): TaskBarIconBase.__init__(self, id) self.icons = [None] self.delays = [1000] self.animation = Animation() self.animation.add_listener(self._update_tray) self._tooltip = ''