def testIntOpt4(self): opt = IntegerOption(self.config, "Test", "intval3", 777) newopt = IntegerOption(self.config, "Test", "intval3", 888) opt.value = 666 self.assertEqual(newopt.value, 666)
def testIntOpt4 (self): opt = IntegerOption (self.config, u"Test", u"intval3", 777) newopt = IntegerOption (self.config, u"Test", u"intval3", 888) opt.value = 666 self.assertEqual (newopt.value, 666)
def savePageTab (self, page): """ Соханить текущую вкладку (код, просмотр и т.п.) в настройки страницы """ assert page != None tabOption = IntegerOption (page.params, self.tabSectionName, self.tabParamName, -1) tabOption.value = self.selectedPageIndex
def testIntOpt3(self): opt = IntegerOption(self.config, "Test", "intval3", 777) opt.value = 666 newconfig = Config(self.path) newopt = IntegerOption(newconfig, "Test", "intval3", 888) self.assertEqual(newopt.value, 666)
def __saveSortStrategy(self): assert self.page is not None sortOption = IntegerOption(self.page.params, self.page.paramsSection, self.sortStrategySection, 0) sortOption.value = self.sortStrategy.GetSelection()
def __saveSortStrategy(self): assert self.page is not None sortOption = IntegerOption(self.page.params, self.page.paramsSection, self.sortStrategySection, 0) sortOption.value = self.sortStrategy.GetSelection()
def savePageTab(self, page): """ Соханить текущую вкладку (код, просмотр и т.п.) в настройки страницы """ assert page is not None tabOption = IntegerOption(page.params, self.tabSectionName, self.tabParamName, -1) tabOption.value = self.selectedPageIndex
def testIntOpt3 (self): opt = IntegerOption (self.config, u"Test", u"intval3", 777) opt.value = 666 newconfig = Config (self.path) newopt = IntegerOption (newconfig, u"Test", u"intval3", 888) self.assertEqual (newopt.value, 666)
def strategy (self, strategy): if strategy == AllTagsSearchStrategy: strategyCode = 1 else: strategyCode = 0 self._strategy = strategy strategyOption = IntegerOption (self.params, self.paramsSection, u"strategy", 0) try: strategyOption.value = strategyCode except ReadonlyException: # Ничего страшного pass Application.onPageUpdate (self, change=PAGE_UPDATE_CONTENT)
def strategy (self, strategy): if strategy == AllTagsSearchStrategy: strategyCode = 1 else: strategyCode = 0 self._strategy = strategy strategyOption = IntegerOption (self.params, self.paramsSection, u"strategy", 0) try: strategyOption.value = strategyCode except ReadonlyException: # Ничего страшного pass Application.onPageUpdate (self, change=PAGE_UPDATE_CONTENT)