def activate( self, ideSettings, ideGlobalData ): " Called when the plugin is activated " VersionControlSystemInterface.activate( self, ideSettings, ideGlobalData ) # Read the settings self.ideWideSettings = getSettings( self.__getIDEConfigFile() ) if self.ide.project.isLoaded(): self.projectSettings = getSettings( self.__getProjectConfigFile() ) self.ide.project.projectChanged.connect( self.__onProjectChanged ) return
def __onProjectChanged( self, what ): " Triggers when a project has changed " if what != self.ide.project.CompleteProject: return if self.ide.project.isLoaded(): self.__settingsLock.lock() self.projectSettings = getSettings( self.__getProjectConfigFile() ) self.__settingsLock.unlock() else: self.__settingsLock.lock() self.projectSettings = None self.__settingsLock.unlock() return