Plugins/DocumentationPlugins/Ericapi/EricapiConfigDialog.py

changeset 248
f4561c24989a
parent 55
b5c84934de9c
child 253
3ccdf551bde7
equal deleted inserted replaced
247:b3da30a52337 248:f4561c24989a
171 self.trUtf8("API files (*.api);;All files (*)")) 171 self.trUtf8("API files (*.api);;All files (*)"))
172 172
173 if filename: 173 if filename:
174 # make it relative, if it is in a subdirectory of the project path 174 # make it relative, if it is in a subdirectory of the project path
175 fn = Utilities.toNativeSeparators(filename) 175 fn = Utilities.toNativeSeparators(filename)
176 fn = fn.replace(self.ppath + os.sep, '') 176 fn = self.project.getRelativePath(fn)
177 self.outputFileEdit.setText(fn) 177 self.outputFileEdit.setText(fn)
178 178
179 def on_outputFileEdit_textChanged(self, filename): 179 def on_outputFileEdit_textChanged(self, filename):
180 """ 180 """
181 Private slot to enable/disable the "OK" button. 181 Private slot to enable/disable the "OK" button.
202 QFileDialog.Options(QFileDialog.ShowDirsOnly)) 202 QFileDialog.Options(QFileDialog.ShowDirsOnly))
203 203
204 if directory: 204 if directory:
205 # make it relative, if it is a subdirectory of the project path 205 # make it relative, if it is a subdirectory of the project path
206 dn = Utilities.toNativeSeparators(directory) 206 dn = Utilities.toNativeSeparators(directory)
207 dn = dn.replace(self.ppath + os.sep, '') 207 dn = self.project.getRelativePath(dn)
208 while dn.endswith(os.sep): 208 while dn.endswith(os.sep):
209 dn = dn[:-1] 209 dn = dn[:-1]
210 self.ignoreDirEdit.setText(dn) 210 self.ignoreDirEdit.setText(dn)
211 211
212 @pyqtSlot() 212 @pyqtSlot()

eric ide

mercurial