code: def config_altered(self, persistGlobal):
          
          _logger.info("Configuration changed - rebuilding in-memory structures")
          
          self.lock.acquire()
          # Rebuild root folder list
          #rootFolders = self.folders
          #self.folders = []
          #for folder in rootFolders:
          #    self.folders.append(folder)
          
          self.hotKeyFolders = []
          self.hotKeys = []
          
          self.abbreviations = []
          
          self.allFolders = []
          self.allItems = []
          
          for folder in self.folders:
              if model.TriggerMode.HOTKEY in folder.modes:
                  self.hotKeyFolders.append(folder)
              self.allFolders.append(folder)
              
              if not self.app.monitor.has_watch(folder.path):
                  self.app.monitor.add_watch(folder.path)
              
              self.__processFolder(folder)
          
          self.globalHotkeys = []
          self.globalHotkeys.append(self.configHotkey)
          self.globalHotkeys.append(self.toggleServiceHotkey)
          #_logger.debug("Global hotkeys: %s", self.globalHotkeys)
          
          #_logger.debug("Hotkey folders: %s", self.hotKeyFolders)
          #_logger.debug("Hotkey phrases: %s", self.hotKeys)
          #_logger.debug("Abbreviation phrases: %s", self.abbreviations)
          #_logger.debug("All folders: %s", self.allFolders)
          #_logger.debug("All phrases: %s", self.allItems)
          
          if persistGlobal:
              save_config(self)
  
          self.lock.release()
docs: Called when some element of configuration has been altered, to update
          the lists of phrases/folders. 
          
          @param persistGlobal: save the global configuration at the end of the process