src/eric7/Project/SpellingPropertiesDialog.py

branch
eric7
changeset 9514
2b104ad132a4
parent 9482
a2bc06a54d9d
child 9653
e67609152c5e
equal deleted inserted replaced
9513:6e260b424396 9514:2b104ad132a4
54 54
55 def initDialog(self): 55 def initDialog(self):
56 """ 56 """
57 Public method to initialize the dialogs data. 57 Public method to initialize the dialogs data.
58 """ 58 """
59 index = self.spellingComboBox.findText(self.project.pdata["SPELLLANGUAGE"]) 59 index = self.spellingComboBox.findText(
60 self.project.getProjectData(dataKey="SPELLLANGUAGE")
61 )
60 if index == -1: 62 if index == -1:
61 index = 0 63 index = 0
62 self.spellingComboBox.setCurrentIndex(index) 64 self.spellingComboBox.setCurrentIndex(index)
63 if self.project.pdata["SPELLWORDS"]: 65 if self.project.getProjectData(dataKey="SPELLWORDS"):
64 self.pwlPicker.setText(self.project.pdata["SPELLWORDS"]) 66 self.pwlPicker.setText(self.project.getProjectData(dataKey="SPELLWORDS"))
65 if self.project.pdata["SPELLEXCLUDES"]: 67 if self.project.getProjectData(dataKey="SPELLEXCLUDES"):
66 self.pelPicker.setText(self.project.pdata["SPELLEXCLUDES"]) 68 self.pelPicker.setText(self.project.getProjectData(dataKey="SPELLEXCLUDES"))
67 69
68 def storeData(self): 70 def storeData(self):
69 """ 71 """
70 Public method to store the entered/modified data. 72 Public method to store the entered/modified data.
71 """ 73 """
72 if self.spellingComboBox.currentIndex() == 0: 74 if self.spellingComboBox.currentIndex() == 0:
73 self.project.pdata["SPELLLANGUAGE"] = Preferences.getEditor( 75 self.project.setProjectData(
74 "SpellCheckingDefaultLanguage" 76 Preferences.getEditor("SpellCheckingDefaultLanguage"),
77 dataKey="SPELLLANGUAGE",
75 ) 78 )
76 else: 79 else:
77 self.project.pdata["SPELLLANGUAGE"] = self.spellingComboBox.currentText() 80 self.project.setProjectData(
78 self.project.pdata["SPELLWORDS"] = self.project.getRelativePath( 81 self.spellingComboBox.currentText(), dataKey="SPELLLANGUAGE"
79 self.pwlPicker.text() 82 )
83 self.project.setProjectData(
84 self.project.getRelativePath(self.pwlPicker.text()),
85 dataKey="SPELLWORDS",
80 ) 86 )
81 self.project.pdata["SPELLEXCLUDES"] = self.project.getRelativePath( 87 self.project.setProjectData(
82 self.pelPicker.text() 88 self.project.getRelativePath(self.pelPicker.text()),
89 dataKey="SPELLEXCLUDES",
83 ) 90 )

eric ide

mercurial