Esempio n. 1
0
 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())
Esempio n. 2
0
 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())
Esempio n. 3
0
 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())
Esempio n. 6
0
 def invoke(self):
     events_dispatcher.notifyCarousel(self.__clientID, notify=False)
     self._completed = True
Esempio n. 7
0
 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())
Esempio n. 8
0
 def invoke(self):
     events_dispatcher.notifyCarousel(self.__clientID, notify=False)
     self._completed = True