def LoadState(self): self.columnsCountConfigElement = IntegerElement( self._config.columnsCount, self.columns, 0, self._config.COLUMNS_COUNT_MAX) self.thumbSizeConfigElement = IntegerElement( self._config.thumbSize, self.thumbSizeCtrl, 0, self._config.THUMB_SIZE_MAX)
def loadState(self): self._tabWidthOption = IntegerElement(self._config.tabWidth, self._owner.tabWidthSpin, self.MIN_TAB_WIDTH, self.MAX_TAB_WIDTH) fillStyleComboBox(self._config, self._owner.styleComboBox, self._config.defaultStyle.value.strip()) allLanguages = self._getAllLanguages() self._owner.langList.Clear() self._owner.langList.AppendItems(allLanguages) selectedLanguages = [ self._langList.getLangName(designation) for designation in self._config.languageList.value ] self._owner.langList.SetCheckedStrings(selectedLanguages)
def LoadState(self): # Показывать ли вкладку с кодом HTML self.showHtmlCodeOption = BooleanElement( self.config.showHtmlCodeOptions, self.htmlCodeCheckbox) self.colorizeWiki.SetValue(self.config.colorizeSyntax.value) # Размер превьюшек по умолчанию self.thumbSizeOption = IntegerElement(self.config.thumbSizeOptions, self.thumbSize, 1, 10000) # Шаблон для пустых страниц emptycontent = EmptyContent(Application.config) self.emptyTplTextCtrl.SetValue(emptycontent.content) # Стиль ссылок по умолчанию linkStyle = self.config.linkStyleOptions.value self.linkStyleCombo.SetSelection( linkStyle if linkStyle >= 0 and linkStyle < self.linkStyleCombo.GetCount() else 0)
def loadState(self): self._tabWidthOption = IntegerElement(self.__config.tabWidth, self.__owner.tabWidthSpin, self.MIN_TAB_WIDTH, self.MAX_TAB_WIDTH) fillStyleComboBox(self.__config, self.__owner.styleComboBox, self.__config.defaultStyle.value.strip()) allLanguages = self._getAllLanguages() self.__owner.langList.Clear() self.__owner.langList.AppendItems(allLanguages) # Уберем языки, которых нет в списке selectedLanguages = [ item for item in self.__config.languageList.value if item in allLanguages ] self.__owner.langList.SetCheckedStrings(selectedLanguages)