Exemple #1
0
 def __init__(self, parent, numShown=5, debug=None):
     self.parent = parent
     self.numShown = int(numShown)
     self.debug = debug
     self.filename = getHomeDirectory() + os.sep + ".kodos" + os.sep + "recent_files"
     self.__recent_files = []
     self.__indecies = []
     self.load()
Exemple #2
0
 def getRecentContexts(self):
     """return the last active context"""
     contexts = self.getValue(Preferences.RECENTCONTEXTS,
                              [util.getHomeDirectory()])
     cxts = []
     for context in contexts:
         ncontext = util.normalizePath(context)
         if not ncontext in cxts:
             cxts.append(ncontext)
     return cxts
Exemple #3
0
 def loadDefaultPreferences(self):
     self.setRecentContext(util.getHomeDirectory())
Exemple #4
0
 def getPreferenceFilename(self):
     """return the full path to the global preference file"""
     f = os.path.join(util.getHomeDirectory(), Preferences.PREFERENCEFILE)
     return f