def timeToUpdateTheColors_(self, sender): syntaxAttrs = getSyntaxTextAttributes() syntaxAttrs["string"][NSForegroundColorAttributeName] = self.stringsColorWell.color() syntaxAttrs["keyword"][NSForegroundColorAttributeName] = self.keywordsColorWell.color() syntaxAttrs["identifier"][NSForegroundColorAttributeName] = self.funcClassColorWell.color() syntaxAttrs["comment"][NSForegroundColorAttributeName] = self.commentsColorWell.color() setSyntaxTextAttributes(syntaxAttrs)
def awakeFromNib(self): self.textFontChanged_(None) syntaxAttrs = syntaxAttrs = getSyntaxTextAttributes() self.stringsColorWell.setColor_(syntaxAttrs["string"][NSForegroundColorAttributeName]) self.keywordsColorWell.setColor_(syntaxAttrs["keyword"][NSForegroundColorAttributeName]) self.funcClassColorWell.setColor_(syntaxAttrs["identifier"][NSForegroundColorAttributeName]) self.commentsColorWell.setColor_(syntaxAttrs["comment"][NSForegroundColorAttributeName]) nc = NSNotificationCenter.defaultCenter() nc.addObserver_selector_name_object_(self, "textFontChanged:", "PyDETextFontChanged", None)
def timeToUpdateTheColors_(self, sender): syntaxAttrs = getSyntaxTextAttributes() syntaxAttrs["string"][ NSForegroundColorAttributeName] = self.stringsColorWell.color() syntaxAttrs["keyword"][ NSForegroundColorAttributeName] = self.keywordsColorWell.color() syntaxAttrs["identifier"][ NSForegroundColorAttributeName] = self.funcClassColorWell.color() syntaxAttrs["comment"][ NSForegroundColorAttributeName] = self.commentsColorWell.color() setSyntaxTextAttributes(syntaxAttrs)
def awakeFromNib(self): self.textFontChanged_(None) syntaxAttrs = syntaxAttrs = getSyntaxTextAttributes() self.stringsColorWell.setColor_( syntaxAttrs["string"][NSForegroundColorAttributeName]) self.keywordsColorWell.setColor_( syntaxAttrs["keyword"][NSForegroundColorAttributeName]) self.funcClassColorWell.setColor_( syntaxAttrs["identifier"][NSForegroundColorAttributeName]) self.commentsColorWell.setColor_( syntaxAttrs["comment"][NSForegroundColorAttributeName]) nc = NSNotificationCenter.defaultCenter() nc.addObserver_selector_name_object_(self, "textFontChanged:", "PyDETextFontChanged", None)