Preferences/ConfigurationPages/EditorAPIsPage.py

changeset 3025
67064c71df21
parent 3020
542e97d4ecb3
child 3038
7fe9a53280bd
child 3058
0a02c433f52d
equal deleted inserted replaced
3024:17c01303a239 3025:67064c71df21
44 self.apiAutoPrepareCheckBox.setChecked( 44 self.apiAutoPrepareCheckBox.setChecked(
45 Preferences.getEditor("AutoPrepareAPIs")) 45 Preferences.getEditor("AutoPrepareAPIs"))
46 46
47 import QScintilla.Lexers 47 import QScintilla.Lexers
48 self.apis = {} 48 self.apis = {}
49 apiLanguages = sorted([''] + \ 49 apiLanguages = sorted(
50 list(QScintilla.Lexers.getSupportedLanguages().keys())) 50 [''] + list(QScintilla.Lexers.getSupportedLanguages().keys()))
51 for lang in apiLanguages: 51 for lang in apiLanguages:
52 if lang != "Guessed": 52 if lang != "Guessed":
53 self.apiLanguageComboBox.addItem(lang) 53 self.apiLanguageComboBox.addItem(lang)
54 self.currentApiLanguage = '' 54 self.currentApiLanguage = ''
55 self.on_apiLanguageComboBox_activated(self.currentApiLanguage) 55 self.on_apiLanguageComboBox_activated(self.currentApiLanguage)
59 59
60 def save(self): 60 def save(self):
61 """ 61 """
62 Public slot to save the Editor APIs configuration. 62 Public slot to save the Editor APIs configuration.
63 """ 63 """
64 Preferences.setEditor("AutoPrepareAPIs", 64 Preferences.setEditor(
65 "AutoPrepareAPIs",
65 self.apiAutoPrepareCheckBox.isChecked()) 66 self.apiAutoPrepareCheckBox.isChecked())
66 67
67 lang = self.apiLanguageComboBox.currentText() 68 lang = self.apiLanguageComboBox.currentText()
68 self.apis[lang] = self.__editorGetApisFromApiList() 69 self.apis[lang] = self.__editorGetApisFromApiList()
69 70

eric ide

mercurial