69 |
69 |
70 def loadSubstyles(self): |
70 def loadSubstyles(self): |
71 """ |
71 """ |
72 Public method to load the sub-styles from the settings file. |
72 Public method to load the sub-styles from the settings file. |
73 """ |
73 """ |
74 settings = Preferences.Prefs.settings |
74 settings = Preferences.getSettings() |
75 |
75 |
76 # Step 1: check if sub-styles were defined and saved |
76 # Step 1: check if sub-styles were defined and saved |
77 subStylesDefined = False |
77 subStylesDefined = False |
78 for baseStyle in self.baseStyles: |
78 for baseStyle in self.baseStyles: |
79 key = "Scintilla/{0}/style{1}/SubStyleLength".format( |
79 key = "Scintilla/{0}/style{1}/SubStyleLength".format( |
245 Public method to save the sub-styles. |
245 Public method to save the sub-styles. |
246 """ |
246 """ |
247 if not self.__subStylesInitialized: |
247 if not self.__subStylesInitialized: |
248 return |
248 return |
249 |
249 |
250 settings = Preferences.Prefs.settings |
250 settings = Preferences.getSettings() |
251 |
251 |
252 # Step 1: remove all sub-style definitions first |
252 # Step 1: remove all sub-style definitions first |
253 for baseStyle in self.baseStyles: |
253 for baseStyle in self.baseStyles: |
254 key = "Scintilla/{0}/style{1}/SubStyleLength".format( |
254 key = "Scintilla/{0}/style{1}/SubStyleLength".format( |
255 self.language(), baseStyle) |
255 self.language(), baseStyle) |