Beispiel #1
0
 def savePrefs(self, kpf):
     prefSvc = components.classes["@activestate.com/koPrefService;1"]\
                         .getService().prefs # global prefs
     # multi tree, we want JUST the project passed in.  Get all the
     # id's from the project, and then get the matching id's from
     # nodeIsOpen
     kpf = UnwrapObject(kpf)
     nodeIsOpen = {}
     for id in self._nodeIsOpen.keys():
         if kpf.getChildById(id):
             nodeIsOpen[id] = self._nodeIsOpen[id]
     prefSvc.setStringPref("kpf_open_nodes_%s" % kpf.id, repr(nodeIsOpen))
Beispiel #2
0
 def savePrefs(self, kpf):
     prefSvc = components.classes["@activestate.com/koPrefService;1"]\
                         .getService().prefs # global prefs
     # multi tree, we want JUST the project passed in.  Get all the
     # id's from the project, and then get the matching id's from
     # nodeIsOpen
     kpf = UnwrapObject(kpf)
     nodeIsOpen = {}
     for id in self._nodeIsOpen.keys():
         if kpf.getChildById(id):
             nodeIsOpen[id] = self._nodeIsOpen[id]
     prefSvc.setStringPref("kpf_open_nodes_%s" % kpf.id,
                           repr(nodeIsOpen))