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 ) |