From 17c6f2cd2bd88c095ffe85d78b335b6fb69cc9f9 Mon Sep 17 00:00:00 2001 From: chrys87 Date: Fri, 25 May 2018 12:59:10 +0200 Subject: [PATCH] Update attributeManager.py --- src/fenrirscreenreader/core/attributeManager.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/fenrirscreenreader/core/attributeManager.py b/src/fenrirscreenreader/core/attributeManager.py index 5bb573e1..2fdcbfc7 100644 --- a/src/fenrirscreenreader/core/attributeManager.py +++ b/src/fenrirscreenreader/core/attributeManager.py @@ -8,14 +8,14 @@ from fenrirscreenreader.core import debug class attributeManager(): def __init__(self): - pass + self.setDefaultAttributes() def initialize(self, environment): self.env = environment def shutdown(self): pass - def isDefaultAttribute(attribute): - defaultAttributes = [] - defaultAttributes.append(( + def setDefaultAttributes(self): + self.defaultAttributes = [] + self.defaultAttributes.append(( 'white', # fg 'black', # bg False, # bold @@ -27,7 +27,7 @@ class attributeManager(): 'default', # fontsize 'default' # fontfamily )) #end attribute - defaultAttributes.append(( + self.defaultAttributes.append(( 'default', # fg 'default', # bg False, # bold @@ -38,8 +38,9 @@ class attributeManager(): False, # blink 'default', # fontsize 'default' # fontfamily - )) #end attribute - return attribute in defaultAttributes + )) #end attribute + def isDefaultAttribute(self,attribute): + return attribute in self.defaultAttributes def formatAttributes(self, attribute, attributeFormatString = None): # "black", # "red",