示例#1
0
 def OnStatus(self, event):
     status_dict = statuscombo.status_dict
     for status in status_dict:
         if status_dict[status] == event.GetId():
             import hooks
             hooks.notify('digsby.statistics.ui.select_status')
             profile.set_status(status)
示例#2
0
文件: status.py 项目: sgricci/digsby
    def onsave(diag):
        status = diag.StatusMessageFromInfo()
        if diag.SaveForLater:
            # only save if the checkbox is checked
            profile.add_status_message(status)

        import hooks; hooks.notify('digsby.statistics.ui.select_status')
        profile.set_status(status)
示例#3
0
def set_profile_status(msg):
    '''
    The combo calls this method by default when setting a new status.

    This can be changed in the constructor.
    '''
    import hooks; hooks.notify('digsby.statistics.ui.select_status')
    return profile.set_status(msg)
示例#4
0
def set_profile_status(msg):
    '''
    The combo calls this method by default when setting a new status.

    This can be changed in the constructor.
    '''
    import hooks
    hooks.notify('digsby.statistics.ui.select_status')
    return profile.set_status(msg)
示例#5
0
    def on_timer(self):
        'Invoked when the song check timer goes off. Which happens a lot.'
        status = profile.status
        if not isinstance(status, NowPlayingStatus):
            # early exit for when the status message is not a music status
            if hasattr(self, 'timer'):
                self.timer.stop()
            return

        self.check_song()
        try:
            new_message = self.status.message
        except Exception:
            traceback.print_exc()
            return

        if new_message != profile.status.message:
            log.info('current message: %r', profile.status.message)
            log.info('setting new now playing status: message=%r, cursong=%r', new_message, profile.status.message)
            profile.set_status(self.status)
示例#6
0
 def OnStatus(self, event):
     status_dict = statuscombo.status_dict
     for status in status_dict:
         if status_dict[status] == event.GetId():
             import hooks; hooks.notify('digsby.statistics.ui.select_status')
             profile.set_status(status)
示例#7
0
 def _do_set_status(s = status):
     import hooks; hooks.notify('digsby.statistics.ui.select_status')
     return profile.set_status(s)
示例#8
0
def umenuitem(menu, status):
    menu.AddItem(status.title,
                 bitmap=status.icon,
                 callback=lambda status=status: profile.set_status(status))
示例#9
0
 def _do_set_status(s=status):
     import hooks
     hooks.notify('digsby.statistics.ui.select_status')
     return profile.set_status(s)
示例#10
0
def umenuitem(menu, status):
    menu.AddItem(status.title, bitmap = status.icon,
                 callback = lambda status=status: profile.set_status(status))