Example #1
0
    def Load(self):
        strFile = self.CalcFileName()

        ini = IniFile()
        if not ini.Load(strFile):
            return False

        nTotalCount = int(ini.GetValue('Bookmarks', 'Count', 0))
        #print nTotalCount

        strKey = ''
        for i in range(nTotalCount):
            strKey = '%d_Title' % i
            strTitle = ini.GetValue(self.g_szSection, strKey, '')
            strKey = '%d_Path' % i
            strPath = ini.GetValue(self.g_szSection, strKey, '')
            item = BrowseBookmark(strTitle, strPath)

            if (item.IsValid()):
                self.m_lstBookmarks.append(item)

        return True
Example #2
0
    def __init__(self):
        self.m_bLangRestartReminder = True
        p = PathName()
        strFile = p.GetIniDirectory()
        #print strFile
        #TOFIX
        strFile += '/atol.ini'
        ini = IniFile()
        inifileloaded = False
        self.m_strCurLang = 'en'

        if ini.Load(strFile):
            inifileloaded = true
            strValue = ini.GetValue('Default', 'Language', '')
            if (strValue != ''):
                self.m_strCurLang = strValue
            else:
                #// francesco: not sure, if there exists already a translated mo file
                #// m_strCurLang = wxLANGUAGE_DEFAULT;
                self.m_strCurLang = ''
        else:
            self.m_strCurLang = ''
        self.FindLanguages()