def setController(self, controller): controller.activate() events_dispatcher.notifyCarousel(controller.getChannel().getClientID(), notify=False) self._controller = weakref.ref(controller) if self.flashObject: self.as_setJoinedS(controller.isJoined())
def __addNotification(self, invite): formatted = g_settings.htmlTemplates.format('inviteToSpecialBattle', ctx={'icon': self.NOTIFICATION_ICON.get(invite.prbType, self.NOTIFICATION_ICON_DEFAULT), 'text': AutoInviteTextFormatter().getText(invite)}) self.__notifications.append(formatted) if self._activated: if self._view: self._view.as_addMessageS(formatted) else: events_dispatcher.notifyCarousel(self._channel.getClientID())
def __addNotification(self, invite): formatted = g_settings.htmlTemplates.format('inviteToSpecialBattle', ctx={'icon': self.NOTIFICATION_ICON.get(invite.prbType, self.NOTIFICATION_ICON_DEFAULT), 'text': u'%s, %s' % (unicode(getPrebattleFullDescription(invite.description), 'utf-8'), unicode(getBattleSessionStartTimeString(invite.startTime), 'utf-8'))}) self.__notifications.append(formatted) if self._activated: if self._view: self._view.as_addMessageS(formatted) else: events_dispatcher.notifyCarousel(self._channel.getClientID())
def __addNotification(self, invite): formatted = g_settings.htmlTemplates.format( 'inviteToSpecialBattle', ctx={ 'icon': self.NOTIFICATION_ICON.get(invite.prbType, self.NOTIFICATION_ICON_DEFAULT), 'text': u'%s, %s' % (unicode(getPrebattleFullDescription(invite.description), 'utf-8'), unicode(getBattleSessionStartTimeString(invite.startTime), 'utf-8')) }) self.__notifications.append(formatted) if self._activated: if self._view: self._view.as_addMessageS(formatted) else: events_dispatcher.notifyCarousel(self._channel.getClientID())
def invoke(self): events_dispatcher.notifyCarousel(self.__clientID, notify=False) self._completed = True