Пример #1
0
    def LoadSettingsTable(self):
        if len(Globals.TextCatDirList) == 0:
            db = SqliteDatabase(Globals.TextCatFileName)
            if not db.OpenConnection():
                return
            query = "select Stemmer, DirList, CategoryList from " + Constants.TextCatSettingsTable
            rows = db.FetchAllRows(query)
            for row in rows:
                Globals.Stemmer = row[0]
                self.DirList = CommonFunctions.RemoveDoubleSlashes(row[1])
                self.CategoryList = row[2]

            Globals.TextCatCategoryList = self.CategoryList.split(';')
            Globals.TextCatDirList = self.DirList.split(';')

        self.choiceStemmers.SetStringSelection(Globals.Stemmer)