コード例 #1
0
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
コード例 #2
0
ファイル: taskbar.py プロジェクト: AlexUlrich/digsby
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
コード例 #3
0
    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 = ''
コード例 #4
0
ファイル: taskbar.py プロジェクト: AlexUlrich/digsby
    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 = ''