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