Beispiel #1
0
 def load(self):
     """Load preferences from scratch, discarding any mods and deletions."""
     self.user = Preferences(os.path.join(utils.getgraildir(),
                                          USERPREFSFILENAME))
     self.sys = Preferences(os.path.join(utils.get_grailroot(),
                                         SYSPREFSFILENAME),
                            1)
 def load(self):
     """Load preferences from scratch, discarding any mods and deletions."""
     self.user = Preferences(os.path.join(utils.getgraildir(),
                                          USERPREFSFILENAME))
     self.sys = Preferences(os.path.join(utils.get_grailroot(),
                                         SYSPREFSFILENAME),
                            1)
Beispiel #3
0
 def __init__(self, prefs=None):
     utils._grail_app = self
     if prefs is None:
         import GrailPrefs
         self.prefs = GrailPrefs.AllPreferences()
     else:
         self.prefs = prefs
     self.graildir = utils.getgraildir()
     user_icons = os.path.join(self.graildir, 'icons')
     utils.establish_dir(self.graildir)
     utils.establish_dir(user_icons)
     self.iconpath = [
         user_icons, os.path.join(utils.get_grailroot(), 'icons')]
     #
     self.__loaders = {}
     #
     # Add our type map file to the set used to initialize the shared map:
     #
     typefile = os.path.join(self.graildir, "mime.types") 
     mimetypes.init(mimetypes.knownfiles + [typefile])
Beispiel #4
0
 def __init__(self, prefs=None):
     utils._grail_app = self
     if prefs is None:
         import GrailPrefs
         self.prefs = GrailPrefs.AllPreferences()
     else:
         self.prefs = prefs
     self.graildir = utils.getgraildir()
     user_icons = os.path.join(self.graildir, 'icons')
     utils.establish_dir(self.graildir)
     utils.establish_dir(user_icons)
     self.iconpath = [
         user_icons,
         os.path.join(utils.get_grailroot(), 'icons')
     ]
     #
     self.__loaders = {}
     #
     # Add our type map file to the set used to initialize the shared map:
     #
     typefile = os.path.join(self.graildir, "mime.types")
     mimetypes.init(mimetypes.knownfiles + [typefile])