Exemplo n.º 1
0
 def _updateYearRewardCounters(self):
     isNeedUpdate = False
     if AccountSettings.getCounters(RANKED_AWARDS_COUNTER) > 0:
         AccountSettings.setCounters(RANKED_AWARDS_COUNTER, 0)
         isNeedUpdate = True
     if not AccountSettings.getSettings(RANKED_CURRENT_AWARDS_BUBBLE_YEAR_REACHED):
         AccountSettings.setSettings(RANKED_CURRENT_AWARDS_BUBBLE_YEAR_REACHED, True)
         isNeedUpdate = True
     if not AccountSettings.getSettings(RANKED_AWARDS_BUBBLE_YEAR_REACHED):
         AccountSettings.setSettings(RANKED_AWARDS_BUBBLE_YEAR_REACHED, True)
         isNeedUpdate = True
     if isNeedUpdate:
         self._updateCounters()
Exemplo n.º 2
0
 def setSettings(self):
     newSize = settings.clampMinimapSizeIndex(
         AccountSettings.getSettings(self.__currentSizeSettings))
     if self.__sizeIndex != newSize:
         self.__sizeIndex = newSize
         self._parentObj.as_setSizeS(self.__sizeIndex)
     self.__updateAlpha()
Exemplo n.º 3
0
    def __showStylePreview(self, styleID):
        styledVehicleCD = None
        minLvl, _ = self.__rankedController.getSuitableVehicleLevels()
        if g_currentVehicle.isPresent() and g_currentVehicle.item.level >= minLvl:
            styledVehicleCD = g_currentVehicle.item.intCD
        else:
            accDossier = self.__itemsCache.items.getAccountDossier()
            vehicles = accDossier.getRankedStats().getVehicles()
            if not vehicles:
                vehicles = accDossier.getRandomStats().getVehicles()
            if vehicles:
                sortedVehicles = sorted(vehicles.items(), key=lambda vStat: vStat[1].battlesCount, reverse=True)
                for vehicleCD, _ in sortedVehicles:
                    vehicleType = getVehicleType(vehicleCD)
                    if vehicleType.level >= minLvl:
                        styledVehicleCD = vehicleCD
                        break

            if not styledVehicleCD:
                vehiclesPool = AccountSettings.getSettings(RANKED_STYLED_VEHICLES_POOL)
                if not vehiclesPool:
                    vehiclesPool = list(_DEFAULT_STYLED_VEHICLES)
                vehicleName = vehiclesPool.pop(0)
                styledVehicleCD = VehicleDescriptor(typeName=vehicleName).type.compactDescr
                vehiclesPool.append(vehicleName)
                AccountSettings.setSettings(RANKED_STYLED_VEHICLES_POOL, vehiclesPool)
        styleDescr = self.__styleDescriptions.get(styleID, '')
        style = first(self.__itemsCache.items.getStyles(REQ_CRITERIA.CUSTOM(lambda item: item.id == styleID)).values())
        showStylePreview(styledVehicleCD, style, styleDescr, self._backToLeaguesCallback)
        return
 def _populate(self):
     super(EpicMinimapComponent, self)._populate()
     mode = AccountSettings.getSettings('epicMinimapZoom')
     if mode > self.__maxZoomMode:
         mode = self.__maxZoomMode
     self.updateZoomMode(mode)
     self.__rangeScale = self.__calculateRangeScale(_ZOOM_MODE_MIN, self.__maxZoomMode, mode)
    def invalidateArenaInfo(self):
        isPersonalMissionsEnabled = self.lobbyContext.getServerSettings().isPersonalMissionsEnabled
        if not self.__isInited:
            lastSelectedBranch = AccountSettings.getSettings(LAST_SELECTED_PM_BRANCH)
            personalMissions = self.eventsCache.getPersonalMissions()
            selectedMissionsIDs = self.__battleCtx.getSelectedQuestIDs()
            selectedMissionsInfo = self.__battleCtx.getSelectedQuestInfo() or {}
            if selectedMissionsIDs:
                missions = personalMissions.getAllQuests()
                for missionID in selectedMissionsIDs:
                    mission = missions.get(missionID)
                    if mission and not mission.isDisabled() and isPersonalMissionsEnabled(mission.getQuestBranch()):
                        pqState = selectedMissionsInfo.get(missionID, (0, PM_STATE.NONE))[1]
                        mission.updatePqStateInBattle(pqState)
                        self.__inProgressQuests[missionID] = mission
                        generalQuestID = mission.getGeneralQuestID()
                        if mission.getPMType().branch == lastSelectedBranch:
                            self.__selectedQuest = mission
                        self.__storage[generalQuestID] = BattleProgressStorage(generalQuestID, mission.getConditionsConfig(), mission.getConditionsProgress(), mission.isOneBattleQuest())

                if self.__selectedQuest is None:
                    self.__selectedQuest = first(self.__inProgressQuests.itervalues())
                self.__updateTimerConditions(sendDiff=False)
            self.__isInited = True
            if self.__selectedQuest:
                self.__lastSelectedQuestID = self.__selectedQuest.getID()
            self.onQuestProgressInited()
        return
Exemplo n.º 6
0
    def getSelectedVehicles(self, section, useAll = True):
        """
        Returns list of intCD's of selected vehicles.
        Args:
            section: section in AccountSettings to store
            useAll: should we use all vehicles
        
        Returns:
            selected vehicles list
        """
        accSettings = dict(AccountSettings.getSettings('unitWindow'))
        vehicles = accSettings.get(section, [])
        items = self.itemsCache.items
        if vehicles or not useAll:
            selectedVehicles = []
            for vehCD in vehicles:
                vehCD = int(vehCD)
                if items.doesVehicleExist(vehCD):
                    vehicle = self.itemsCache.items.getItemByCD(vehCD)
                    if vehicle.isInInventory:
                        selectedVehicles.append(vehCD)
                else:
                    LOG_WARNING('There is invalid vehicle compact descriptor in the stored unit seelected vehicles data', vehCD)

        else:
            criteria = REQ_CRITERIA.INVENTORY
            selectedVehicles = [ k for k, v in self.itemsCache.items.getVehicles(criteria).iteritems() if v.level in self._rosterSettings.getLevelsRange() ]
        return selectedVehicles
Exemplo n.º 7
0
 def start(self):
     arenaDP = self.sessionProvider.getArenaDP()
     g_eventBus.addListener(GameEvent.SHOW_BTN_HINT, self.__handleShowBtnHint, scope=EVENT_BUS_SCOPE.GLOBAL)
     g_eventBus.addListener(GameEvent.FULL_STATS_QUEST_PROGRESS, self.__handlePressHintBtn, scope=EVENT_BUS_SCOPE.BATTLE)
     vInfo = arenaDP.getVehicleInfo()
     self.__isActive = vInfo.vehicleType.level >= 4
     self.__hintsLeft = AccountSettings.getSettings(QUEST_PROGRESS_SHOWS_COUNT)
Exemplo n.º 8
0
 def _generateOptions(self, ctx=None):
     options = []
     vehicle = self.__getVehicle(self.vehCD)
     self._manageStartOptions(options, vehicle)
     if vehicle.hasNationGroup:
         isNew = not AccountSettings.getSettings(NATION_CHANGE_VIEWED)
         options.append(self._makeItem(VEHICLE.NATION_CHANGE, MENU.CONTEXTMENU_NATIONCHANGE, {'enabled': vehicle.isNationChangeAvailable,
          'isNew': isNew}))
     if vehicle.isPurchased:
         options.append(self._makeItem(VEHICLE.SELL, MENU.contextmenu(VEHICLE.SELL), {'enabled': vehicle.canSell}))
     elif self.__isPurchaseEnabled(vehicle):
         items = self.itemsCache.items
         if vehicle.isRestoreAvailable():
             label = MENU.CONTEXTMENU_RESTORE
         elif vehicle.canTradeIn:
             label = MENU.CONTEXTMENU_BUYORTRADEIN
         else:
             label = MENU.CONTEXTMENU_BUY
         if vehicle.isCollectible and not self.__isCollectibleVehicleEnabled(vehicle):
             btnEnabled = False
         elif canBuyGoldForVehicleThroughWeb(vehicle):
             btnEnabled = True
         else:
             btnEnabled = vehicle.mayObtainWithMoneyExchange(items.stats.money, items.shop.exchangeRate)
         options.append(self._makeItem(VEHICLE.BUY, label, {'enabled': btnEnabled}))
     elif self.__isResearchEnabled(vehicle):
         isNextToUnlock, isXpEnough = g_techTreeDP.isVehicleAvailableToUnlock(self.vehCD)
         isAvailableToUnlock = isNextToUnlock and isXpEnough
         options.append(self._makeItem(VEHICLE.RESEARCH, MENU.contextmenu(VEHICLE.RESEARCH), {'enabled': isAvailableToUnlock}))
     self._manageEndOptions(options, vehicle)
     return options
Exemplo n.º 9
0
 def _getOptionCustomData(self, label):
     optionData = super(VehiclesRegularCMHandler,
                        self)._getOptionCustomData(label)
     if label in CMLabel.EXCHANGE:
         optionData.visible = self.__canTradeOff()
         optionData.enabled = self.__isReadyToTradeOff()
         optionData.textColor = CM_BUY_COLOR
     elif label in CMLabel.PERSONAL_EXCHANGE:
         optionData.visible = self.__canPersonalTradeIn()
         optionData.enabled = self.__isReadyToPersonalTradeIn()
         optionData.textColor = CM_BUY_COLOR
     elif label == CMLabel.STATS:
         optionData.enabled = _canGoToStats(self._id)
     elif label == CMLabel.GO_TO_COLLECTION:
         optionData.visible = self.__isVehicleCollectorAvailable()
         optionData.enabled = self.__lobbyContext.getServerSettings(
         ).isCollectorVehicleEnabled()
     elif label == CMLabel.ADD_TO_COMPARE:
         optionData.enabled = _canAddToComparisonBasket(self._id)
     elif label == CMLabel.SELL:
         optionData.enabled = self.__canSell()
     elif label == CMLabel.NATION_CHANGE:
         optionData.visible = self.__canNationChange()
         optionData.enabled = self.__isNationChangeAvailable()
         optionData.isNew = not AccountSettings.getSettings(
             NATION_CHANGE_VIEWED)
     return optionData
    def __setColorGradingTechnique(self, value=None):
        colorSettingsSelectedTab = AccountSettings.getSettings(COLOR_SETTINGS_TAB_IDX)
        if colorSettingsSelectedTab is None or not graphics.isRendererPipelineDeferred():
            colorSettingsSelectedTab = 0
        label = SETTINGS.GRAPHICSSETTINGSOPTIONS_NONE
        image = RES_ICONS.MAPS_ICONS_SETTINGS_COLOR_GRADING_TECHNIQUE_NONE
        if colorSettingsSelectedTab == 2:
            label = SETTINGS.COLORSETTINGS_TAB_CUSTOMSETTINGS
            image = RES_ICONS.MAPS_ICONS_SETTINGS_COLOR_GRADING_TECHNIQUE_RANDOM
        elif colorSettingsSelectedTab == 1:
            setting = self.settingsCore.options.getSetting(settings_constants.GRAPHICS.COLOR_GRADING_TECHNIQUE)
            images = graphics.getGraphicSettingImages(settings_constants.GRAPHICS.COLOR_GRADING_TECHNIQUE)
            label = SETTINGS.GRAPHICSSETTINGSOPTIONS_NONE
            image = None
            filterIdx = setting.get() if value is None else value
            if setting is not None:
                for option in setting.getOptions():
                    currentIdx = option.get('data', 0)
                    if currentIdx == filterIdx:
                        label = option.get('label')
                        image = images.get(option.get('data', 0))
                        break

            if image is None:
                image = RES_ICONS.MAPS_ICONS_SETTINGS_COLOR_GRADING_TECHNIQUE_NONE
        self.as_setColorGradingTechniqueS(image, label)
        return
Exemplo n.º 11
0
 def __setSorting(self):
     data = [{
         'name': backport.text(key),
         'id': str(index)
     } for index, (key, _, _) in enumerate(self.__SORTINGS_AND_COMPARATORS)]
     sortingId = AccountSettings.getSettings(CLAN_PREBATTLE_SORTING_KEY)
     self.__currentSorting = sortingId
     self.as_setFiltersS(data, sortingId)
Exemplo n.º 12
0
 def setSettings(self):
     newSize = settings.clampMinimapSizeIndex(AccountSettings.getSettings(self.__currentSizeSettings))
     if self.__sizeIndex != newSize:
         self.__sizeIndex = newSize
         self._parentObj.as_setSizeS(self.__sizeIndex)
     value = int(g_settingsCore.getSetting(settings_constants.GAME.MINIMAP_ALPHA))
     if value:
         self._parentObj.as_setAlphaS(1 - value / 100.0)
Exemplo n.º 13
0
 def _populateAfter(self):
     blueprints = {}
     defaults = AccountSettings.getFilterDefault(GUI_START_BEHAVIOR)
     settings = self.__settingsCore.serverSettings.getSection(GUI_START_BEHAVIOR, defaults)
     if self.__needShowTechTreeIntro(settings):
         if settings[GuiSettingsBehavior.TECHTREE_INTRO_BLUEPRINTS_RECEIVED]:
             blueprints = AccountSettings.getSettings(TECHTREE_INTRO_BLUEPRINTS)
         shared_events.showTechTreeIntro(parent=self.getParentWindow(), blueprints=blueprints)
Exemplo n.º 14
0
 def __updateCounters(self):
     awardsCounter = main_page_vos.getBubbleLabel(
         AccountSettings.getCounters(RANKED_AWARDS_COUNTER) *
         int(not AccountSettings.getSettings(
             RANKED_CURRENT_AWARDS_BUBBLE_YEAR_REACHED)
             or not AccountSettings.getSettings(
                 RANKED_AWARDS_BUBBLE_YEAR_REACHED)))
     infoCounter = main_page_vos.getBubbleLabel(
         AccountSettings.getCounters(RANKED_INFO_COUNTER))
     yearRatingCounter = main_page_vos.getBubbleLabel(
         AccountSettings.getCounters(RANKED_YEAR_RATING_COUNTER))
     shopCounter = main_page_vos.getBubbleLabel(
         AccountSettings.getCounters(RANKED_SHOP_COUNTER))
     self.as_setCountersS(
         main_page_vos.getCountersData(self.__rankedController,
                                       awardsCounter, infoCounter,
                                       yearRatingCounter, shopCounter))
Exemplo n.º 15
0
 def getConfirmDialogMeta(self, ctx):
     if not self.hasLockedState() and not ctx.hasFlags(
             FUNCTIONAL_FLAG.TUTORIAL) and AccountSettings.getSettings(
                 DEFAULT_QUEUE) == QUEUE_TYPE.SANDBOX:
         meta = rally_dialog_meta.createLeavePreQueueMeta(
             ctx, self._queueType, self.canSwitch(ctx))
     else:
         meta = super(SandboxEntity, self).getConfirmDialogMeta(ctx)
     return meta
Exemplo n.º 16
0
 def isNew(self):
     result = False
     if self.isAchieved:
         lastBadgesVisit = AccountSettings.getSettings(LAST_BADGES_VISIT)
         if lastBadgesVisit is not None:
             result = lastBadgesVisit < self.achievedAt
         else:
             result = True
     return result
Exemplo n.º 17
0
 def __rememberGameMode(self):
     currentCycleID = self.getCurrentCycleID()
     rememberedCycleID = AccountSettings.getSettings(
         FUN_RANDOM_LAST_CYCLE_ID)
     if currentCycleID is not None and currentCycleID != rememberedCycleID:
         AccountSettings.setSettings(FUN_RANDOM_LAST_CYCLE_ID,
                                     currentCycleID)
         SelectorBattleTypesUtils.setBattleTypeAsUnknown(
             SELECTOR_BATTLE_TYPES.FUN_RANDOM)
     return
 def __init__(self, parentObj):
     super(VehPostProgressionEntryPoint, self).__init__()
     self._addListeners()
     self._eliteWatchedList = AccountSettings.getSettings(
         BECOME_ELITE_VEHICLES_WATCHED)
     self._parentObj = parentObj
     self._vehicle = None
     self._watchedListDirty = False
     self._modulesToUnlock = set()
     return
Exemplo n.º 19
0
 def setSettings(self):
     newSize = settings.clampMinimapSizeIndex(
         AccountSettings.getSettings(self.__currentSizeSettings))
     if self.__sizeIndex != newSize:
         self.__sizeIndex = newSize
         self._parentObj.as_setSizeS(self.__sizeIndex)
     value = int(
         g_settingsCore.getSetting(settings_constants.GAME.MINIMAP_ALPHA))
     if value:
         self._parentObj.as_setAlphaS(1 - value / 100.0)
Exemplo n.º 20
0
 def setSelectedVehicles(self, section, vehicles):
     """
     Sets the list of selected vehicles
     Args:
         section: section to store
         vehicles: vehicles intCDs
     """
     settings = dict(AccountSettings.getSettings('unitWindow'))
     settings[section] = vehicles
     AccountSettings.setSettings('unitWindow', settings)
Exemplo n.º 21
0
 def __onYearAwardPointsUpdate(self):
     if not AccountSettings.getSettings(RANKED_AWARDS_BUBBLE_YEAR_REACHED):
         points = self.__rankedController.getYearRewardPoints()
         for minPoints, maxPoints in self.__rankedController.getYearAwardsPointsMap().itervalues():
             if maxPoints >= points >= minPoints:
                 AccountSettings.setCounters(RANKED_AWARDS_COUNTER, 1)
                 AccountSettings.setSettings(RANKED_AWARDS_BUBBLE_YEAR_REACHED, True)
                 self.__resetCounters(self._selectedItemID)
                 self.__updateCounters()
                 break
    def __updateTabsData(self):
        selectedTabInd = AccountSettings.getSettings(PREVIEW_INFO_PANEL_IDX)
        if self.__haveCustomCrew or self.__offers:
            tab_ids = [tab['id'] for tab in _TABS_DATA]
            if VEHPREVIEW_CONSTANTS.CREW_LINKAGE in tab_ids:
                selectedTabInd = tab_ids.index(
                    VEHPREVIEW_CONSTANTS.CREW_LINKAGE)
        for idx, tab in enumerate(_TABS_DATA):
            tab['selected'] = selectedTabInd == idx

        self.as_setTabsDataS(_TABS_DATA)
def _updatePostProgressionParameters():
    tutorialStorage = getTutorialGlobalStorage()
    if tutorialStorage is None:
        return
    else:
        isModulesTab = AccountSettings.getSettings(
            PREVIEW_INFO_PANEL_IDX) == _getModulesTabIdx()
        tutorialStorage.setValue(
            GLOBAL_FLAG.VEH_POST_PROGRESSION_ENABLED, isModulesTab
            and g_currentPreviewVehicle.isPostProgressionExists())
        return
Exemplo n.º 24
0
 def start(self):
     arenaDP = self.sessionProvider.getArenaDP()
     crosshairCtrl = self.sessionProvider.shared.crosshair
     vehicleCtrl = self.sessionProvider.shared.vehicleState
     vInfo = arenaDP.getVehicleInfo()
     self.__isObserver = vInfo.isObserver()
     crosshairCtrl.onCrosshairViewChanged += self.__onCrosshairViewChanged
     crosshairCtrl.onStrategicCameraChanged += self.__onStrategicCameraChanged
     vehicleCtrl.onVehicleStateUpdated += self.__onVehicleStateUpdated
     self.__hintsLeft = AccountSettings.getSettings(TRAJECTORY_VIEW_HINT_COUNTER)
     self.__setup(crosshairCtrl, vehicleCtrl)
 def __setQualificationData(self, rank):
     divisionID = rank.getDivision().getID()
     smallImageSrc = rank.getIcon(RANKEDBATTLES_ALIASES.WIDGET_BIG)
     bigImageSrc = rank.getIcon(RANKEDBATTLES_ALIASES.WIDGET_HUGE)
     isFirstEntryMap = AccountSettings.getSettings(
         IS_FIRST_ENTRY_BY_DIVISION_ID)
     isFirstEntry = isFirstEntryMap.get(divisionID, True)
     if isFirstEntry:
         isFirstEntryMap[divisionID] = False
         AccountSettings.setSettings(IS_FIRST_ENTRY_BY_DIVISION_ID,
                                     isFirstEntryMap)
     self.as_setQualificationDataS(smallImageSrc, bigImageSrc, isFirstEntry)
def _updateCollectorHintParameters():
    tutorialStorage = getTutorialGlobalStorage()
    if tutorialStorage is None:
        return
    else:
        isActiveModulesTab = AccountSettings.getSettings(
            PREVIEW_INFO_PANEL_IDX) == _getModulesTabIdx()
        hintValue = False if isActiveModulesTab else _isCollectibleVehicleWithModules(
        )
        tutorialStorage.setValue(
            GLOBAL_FLAG.COLLECTIBLE_VEHICLE_PREVIEW_ENABLED, hintValue)
        return
Exemplo n.º 27
0
 def format(self, message, callback):
     isSynced = yield self._waitForSyncItems()
     formattedMessage = None
     if isSynced:
         yearPosition = AccountSettings.getSettings(RANKED_YEAR_POSITION)
         completedIDs = message.data.get('completedQuestIDs', set())
         rewardsData = getRewardsForQuests(message, self.getQuestOfThisGroup(completedIDs))
         if yearPosition is not None and rewardsData:
             formattedMessage = self.__formatFullMessage(yearPosition, rewardsData)
         else:
             formattedMessage = self.__formatShortMessage()
     callback([MessageData(formattedMessage, self._getGuiSettings(message))])
     return
Exemplo n.º 28
0
 def __updateChangeNationButtonState(self):
     vehicle = self._itemsCache.items.getItemByCD(
         self.__vehicleCompactDescr)
     self.as_setChangeNationButtonDataS({
         'visible':
         vehicle.hasNationGroup and vehicle.isInInventory,
         'enabled':
         vehicle.isNationChangeAvailable,
         'label':
         backport.text(R.strings.menu.vehicleInfo.nationChangeBtn.label()),
         'isNew':
         not AccountSettings.getSettings(NATION_CHANGE_VIEWED)
     })
Exemplo n.º 29
0
 def isNew(self):
     """
     Indicate that player is haven't see the badge yet
     :return: bool
     """
     result = False
     if self.isAchieved:
         lastBadgesVisit = AccountSettings.getSettings(LAST_BADGES_VISIT)
         if lastBadgesVisit is not None:
             result = lastBadgesVisit < self.achievedAt
         else:
             result = True
     return result
 def __addNationChangeOption(self, options, vehicle):
     if not vehicle.hasNationGroup:
         return False
     isNationChangeAvailable = nationChangeIsNew = False
     if vehicle.isInInventory or vehicle.isRented:
         isNationChangeAvailable = vehicle.isNationChangeAvailable
         nationChangeIsNew = not AccountSettings.getSettings(
             NATION_CHANGE_VIEWED)
     options.append(
         self._makeItem(VEHICLE.NATION_CHANGE,
                        MENU.CONTEXTMENU_NATIONCHANGE, {
                            'enabled': isNationChangeAvailable,
                            'isNew': nationChangeIsNew
                        }))
     return True
Exemplo n.º 31
0
 def start(self):
     vStateCtrl = self.sessionProvider.shared.vehicleState
     arenaDP = self.sessionProvider.getArenaDP()
     self.__settings = [
         AccountSettings.getSettings(SIEGE_HINT_SECTION),
         AccountSettings.getSettings(WHEELED_MODE_HINT_SECTION)
     ]
     self._updateCounterOnStart(self.__settings[0], self._HINT_DAY_COOLDOWN,
                                self._HINT_BATTLES_COOLDOWN)
     self._updateCounterOnStart(self.__settings[1], self._HINT_DAY_COOLDOWN,
                                self._HINT_BATTLES_COOLDOWN)
     if arenaDP is not None:
         self.__isObserver = arenaDP.getVehicleInfo().isObserver()
     else:
         self.__isObserver = False
     if vStateCtrl is not None:
         vStateCtrl.onVehicleStateUpdated += self.__onVehicleStateUpdated
         vStateCtrl.onVehicleControlling += self.__onVehicleControlling
         vStateCtrl.onPostMortemSwitched += self.__onPostMortemSwitched
         vStateCtrl.onRespawnBaseMoving += self.__onRespawnBaseMoving
         vehicle = vStateCtrl.getControllingVehicle()
         if vehicle is not None:
             self.__onVehicleControlling(vehicle)
     return
Exemplo n.º 32
0
def __getSettingsFromStorage():
    """Get settings from accountSettings
    """
    return AccountSettings.getSettings(NEW_SETTINGS_COUNTER)
Exemplo n.º 33
0
 def __fullUpdate(self):
     selectedTabInd = AccountSettings.getSettings(PREVIEW_INFO_PANEL_IDX)
     self.__updateHeaderData()
     self.as_updateInfoDataS(self.__getInfoData(selectedTabInd))
     self.__updateBtnState()
     self.__updateStatus()