58 if index == -1: |
58 if index == -1: |
59 index = 0 |
59 index = 0 |
60 self.spellingComboBox.setCurrentIndex(index) |
60 self.spellingComboBox.setCurrentIndex(index) |
61 if self.project.pdata["SPELLWORDS"][0]: |
61 if self.project.pdata["SPELLWORDS"][0]: |
62 self.pwlEdit.setText( |
62 self.pwlEdit.setText( |
63 os.path.join(self.project.ppath, self.project.pdata["SPELLWORDS"][0])) |
63 Utilities.toNativeSeparators(self.project.pdata["SPELLWORDS"][0])) |
64 if self.project.pdata["SPELLEXCLUDES"][0]: |
64 if self.project.pdata["SPELLEXCLUDES"][0]: |
65 self.pelEdit.setText( |
65 self.pelEdit.setText( |
66 os.path.join(self.project.ppath, self.project.pdata["SPELLEXCLUDES"][0])) |
66 Utilities.toNativeSeparators(self.project.pdata["SPELLEXCLUDES"][0])) |
67 |
67 |
68 @pyqtSlot() |
68 @pyqtSlot() |
69 def on_pwlButton_clicked(self): |
69 def on_pwlButton_clicked(self): |
70 """ |
70 """ |
71 Private slot to select the project word list file. |
71 Private slot to select the project word list file. |
72 """ |
72 """ |
73 pwl = self.pwlEdit.text() |
73 pwl = Utilities.fromNativeSeparators(self.pwlEdit.text()) |
74 if not pwl: |
74 if not pwl: |
75 pwl = self.project.ppath |
75 pwl = self.project.ppath |
|
76 elif not os.path.isabs(pwl): |
|
77 pwl = Utilities.fromNativeSeparators(os.path.join(self.project.ppath, pwl)) |
76 file = E5FileDialog.getOpenFileName( |
78 file = E5FileDialog.getOpenFileName( |
77 self, |
79 self, |
78 self.trUtf8("Select project word list"), |
80 self.trUtf8("Select project word list"), |
79 pwl, |
81 pwl, |
80 self.trUtf8("Dictionary File (*.dic);;All Files (*)")) |
82 self.trUtf8("Dictionary File (*.dic);;All Files (*)")) |
81 |
83 |
82 if file: |
84 if file: |
83 self.pwlEdit.setText(Utilities.toNativeSeparators(file)) |
85 self.pwlEdit.setText(self.project.getRelativePath( |
|
86 Utilities.toNativeSeparators(file))) |
84 |
87 |
85 @pyqtSlot() |
88 @pyqtSlot() |
86 def on_pelButton_clicked(self): |
89 def on_pelButton_clicked(self): |
87 """ |
90 """ |
88 Private slot to select the project exclude list file. |
91 Private slot to select the project exclude list file. |
89 """ |
92 """ |
90 pel = self.pelEdit.text() |
93 pel = Utilities.fromNativeSeparators(self.pelEdit.text()) |
91 if not pel: |
94 if not pel: |
92 pel = self.project.ppath |
95 pel = self.project.ppath |
|
96 elif not os.path.isabs(pel): |
|
97 pel = Utilities.fromNativeSeparators(os.path.join(self.project.ppath, pel)) |
93 file = E5FileDialog.getOpenFileName( |
98 file = E5FileDialog.getOpenFileName( |
94 self, |
99 self, |
95 self.trUtf8("Select project exclude list"), |
100 self.trUtf8("Select project exclude list"), |
96 pel, |
101 pel, |
97 self.trUtf8("Dictionary File (*.dic);;All Files (*)")) |
102 self.trUtf8("Dictionary File (*.dic);;All Files (*)")) |
98 |
103 |
99 if file: |
104 if file: |
100 self.pelEdit.setText(Utilities.toNativeSeparators(file)) |
105 self.pelEdit.setText(self.project.getRelativePath( |
|
106 Utilities.toNativeSeparators(file))) |
101 |
107 |
102 def storeData(self): |
108 def storeData(self): |
103 """ |
109 """ |
104 Public method to store the entered/modified data. |
110 Public method to store the entered/modified data. |
105 """ |
111 """ |