13 from PyQt6.QtWidgets import QDialog |
13 from PyQt6.QtWidgets import QDialog |
14 |
14 |
15 from eric7 import Utilities |
15 from eric7 import Utilities |
16 from eric7.EricWidgets import EricMessageBox |
16 from eric7.EricWidgets import EricMessageBox |
17 from eric7.EricWidgets.EricPathPicker import EricPathPickerModes |
17 from eric7.EricWidgets.EricPathPicker import EricPathPickerModes |
|
18 from eric7.SystemUtilities import FileSystemUtilities |
18 |
19 |
19 from .Ui_ToolConfigurationDialog import Ui_ToolConfigurationDialog |
20 from .Ui_ToolConfigurationDialog import Ui_ToolConfigurationDialog |
20 |
21 |
21 |
22 |
22 class ToolConfigurationDialog(QDialog, Ui_ToolConfigurationDialog): |
23 class ToolConfigurationDialog(QDialog, Ui_ToolConfigurationDialog): |
114 " selected program to the Tools-Menu first." |
115 " selected program to the Tools-Menu first." |
115 ), |
116 ), |
116 ) |
117 ) |
117 return |
118 return |
118 |
119 |
119 if not Utilities.isinpath(executable): |
120 if not FileSystemUtilities.isinpath(executable): |
120 EricMessageBox.critical( |
121 EricMessageBox.critical( |
121 self, |
122 self, |
122 self.tr("Add tool entry"), |
123 self.tr("Add tool entry"), |
123 self.tr( |
124 self.tr( |
124 "The selected file could not be found or" |
125 "The selected file could not be found or" |
182 " selected Tools-Menu entry." |
183 " selected Tools-Menu entry." |
183 ), |
184 ), |
184 ) |
185 ) |
185 return |
186 return |
186 |
187 |
187 if not Utilities.isinpath(executable): |
188 if not FileSystemUtilities.isinpath(executable): |
188 EricMessageBox.critical( |
189 EricMessageBox.critical( |
189 self, |
190 self, |
190 self.tr("Change tool entry"), |
191 self.tr("Change tool entry"), |
191 self.tr( |
192 self.tr( |
192 "The selected file could not be found or" |
193 "The selected file could not be found or" |
274 Private slot to check the executable after it has been selected. |
275 Private slot to check the executable after it has been selected. |
275 |
276 |
276 @param path path of the executable |
277 @param path path of the executable |
277 @type str |
278 @type str |
278 """ |
279 """ |
279 if path and not Utilities.isinpath(path): |
280 if path and not FileSystemUtilities.isinpath(path): |
280 EricMessageBox.critical( |
281 EricMessageBox.critical( |
281 self, |
282 self, |
282 self.tr("Select executable"), |
283 self.tr("Select executable"), |
283 self.tr( |
284 self.tr( |
284 "The selected file is not an executable." |
285 "The selected file is not an executable." |