Пример #1
0
 def _disbandClub(self, club):
     if len(club.getMembers()) > 1:
         i18nKey = 'discontinuingFormationConfirmation'
     else:
         i18nKey = 'discontinuingEmptyFormationConfirmation'
     sysMsg = club_fmts.getDestroyClubSysMsg(self.clubsCtrl.getClub(self._clubDbID))
     self._doExitAction(DestroyClubCtx(self._clubDbID), I18nConfirmDialogMeta('staticFormation/staffView/%s' % i18nKey, focusedID=DIALOG_BUTTON_ID.CLOSE), WAITING.CLUBS_DESTROYCLUB, sysMsg)
Пример #2
0
 def _disbandClub(self, club):
     if len(club.getMembers()) > 1:
         i18nKey = 'discontinuingFormationConfirmation'
     else:
         i18nKey = 'discontinuingEmptyFormationConfirmation'
     sysMsg = club_fmts.getDestroyClubSysMsg(self.clubsCtrl.getClub(self._clubDbID))
     self._doExitAction(DestroyClubCtx(self._clubDbID), I18nConfirmDialogMeta('staticFormation/staffView/%s' % i18nKey, focusedID=DIALOG_BUTTON_ID.CLOSE), WAITING.CLUBS_DESTROYCLUB, sysMsg)
Пример #3
0
 def removeMember(self, memberDbID, userName):
     member = self.clubsCtrl.getClub(self._clubDbID).getMember(memberDbID)
     if member.isOwner():
         i18nId = 'staticFormation/staffView/discontinuingFormationConfirmation'
     elif self.__viewerDbID == memberDbID:
         i18nId = 'staticFormation/staffView/leaveClubConfirmation'
     else:
         i18nId = 'staticFormation/staffView/removeMemberConfirmation'
     isOk = yield DialogsInterface.showDialog(I18nConfirmDialogMeta(i18nId, messageCtx={'userName': userName}))
     if isOk:
         if member.isOwner():
             ctx = DestroyClubCtx(self._clubDbID)
             waitingID = WAITING.CLUBS_DESTROYCLUB
             successSysMsg = club_fmts.getDestroyClubSysMsg(self.clubsCtrl.getClub(self._clubDbID))
         elif self.__viewerDbID == memberDbID:
             ctx = LeaveClubCtx(self._clubDbID)
             waitingID = WAITING.CLUBS_LEAVECLUB
             successSysMsg = club_fmts.getLeaveClubSysMsg(self.clubsCtrl.getClub(self._clubDbID))
         else:
             ctx = KickMemberCtx(self._clubDbID, memberDbID)
             waitingID = WAITING.CLUBS_CLUBKICKMEMBER
             successSysMsg = club_fmts.getKickMemberSysMsg(self.getUserFullName(memberDbID))
         self.showWaiting(waitingID)
         result = yield self.clubsCtrl.sendRequest(ctx)
         if result.isSuccess():
             SystemMessages.pushMessage(successSysMsg)
         self.hideWaiting()
Пример #4
0
 def _disbandClub(self, club):
     if len(club.getMembers()) > 1:
         i18nKey = 'discontinuingFormationConfirmation'
     else:
         i18nKey = 'discontinuingEmptyFormationConfirmation'
     sysMsg = club_fmts.getDestroyClubSysMsg(self.clubsCtrl.getClub(self._clubDbID))
     self._doExitAction(DestroyClubCtx(self._clubDbID), I18nConfirmDialogMeta('staticFormation/staffView/%s' % i18nKey, focusedID=DIALOG_BUTTON_ID.CLOSE), WAITING.CLUBS_DESTROYCLUB, sysMsg)
     inviteAnimationDefaultValue = AccountSettings.getFilterDefault(SHOW_INVITE_COMMAND_BTN_ANIMATION)
     AccountSettings.setFilter(SHOW_INVITE_COMMAND_BTN_ANIMATION, inviteAnimationDefaultValue)
Пример #5
0
 def _disbandClub(self, club):
     if len(club.getMembers()) > 1:
         i18nKey = 'discontinuingFormationConfirmation'
     else:
         i18nKey = 'discontinuingEmptyFormationConfirmation'
     sysMsg = club_fmts.getDestroyClubSysMsg(
         self.clubsCtrl.getClub(self._clubDbID))
     self._doExitAction(
         DestroyClubCtx(self._clubDbID),
         I18nConfirmDialogMeta('staticFormation/staffView/%s' % i18nKey,
                               focusedID=DIALOG_BUTTON_ID.CLOSE),
         WAITING.CLUBS_DESTROYCLUB, sysMsg)
     inviteAnimationDefaultValue = AccountSettings.getFilterDefault(
         SHOW_INVITE_COMMAND_BTN_ANIMATION)
     AccountSettings.setFilter(SHOW_INVITE_COMMAND_BTN_ANIMATION,
                               inviteAnimationDefaultValue)