Exemple #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)
Exemple #2
0
    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)
Exemple #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)
Exemple #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)
Exemple #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)
Exemple #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)
Exemple #7
0
 def _do_set_status(s = status):
     import hooks; hooks.notify('digsby.statistics.ui.select_status')
     return profile.set_status(s)
Exemple #8
0
def umenuitem(menu, status):
    menu.AddItem(status.title,
                 bitmap=status.icon,
                 callback=lambda status=status: profile.set_status(status))
Exemple #9
0
 def _do_set_status(s=status):
     import hooks
     hooks.notify('digsby.statistics.ui.select_status')
     return profile.set_status(s)
Exemple #10
0
def umenuitem(menu, status):
    menu.AddItem(status.title, bitmap = status.icon,
                 callback = lambda status=status: profile.set_status(status))