17 |
17 |
18 class CondaPage(ConfigurationPageBase, Ui_CondaPage): |
18 class CondaPage(ConfigurationPageBase, Ui_CondaPage): |
19 """ |
19 """ |
20 Class implementing the conda configuration page. |
20 Class implementing the conda configuration page. |
21 """ |
21 """ |
|
22 |
22 def __init__(self): |
23 def __init__(self): |
23 """ |
24 """ |
24 Constructor |
25 Constructor |
25 """ |
26 """ |
26 super().__init__() |
27 super().__init__() |
27 self.setupUi(self) |
28 self.setupUi(self) |
28 self.setObjectName("CondaPage") |
29 self.setObjectName("CondaPage") |
29 |
30 |
30 self.condaExePicker.setMode(EricPathPickerModes.OPEN_FILE_MODE) |
31 self.condaExePicker.setMode(EricPathPickerModes.OPEN_FILE_MODE) |
31 self.condaExePicker.setToolTip(self.tr( |
32 self.condaExePicker.setToolTip( |
32 "Press to select the conda executable via a file selection" |
33 self.tr( |
33 " dialog.")) |
34 "Press to select the conda executable via a file selection" " dialog." |
34 |
35 ) |
|
36 ) |
|
37 |
35 # set initial values |
38 # set initial values |
36 self.__condaExecutable = Preferences.getConda("CondaExecutable") |
39 self.__condaExecutable = Preferences.getConda("CondaExecutable") |
37 self.condaExePicker.setText(self.__condaExecutable) |
40 self.condaExePicker.setText(self.__condaExecutable) |
38 |
41 |
39 def save(self): |
42 def save(self): |
40 """ |
43 """ |
41 Public slot to save the conda configuration. |
44 Public slot to save the conda configuration. |
42 """ |
45 """ |
43 condaExecutable = self.condaExePicker.text() |
46 condaExecutable = self.condaExePicker.text() |
44 if condaExecutable != self.__condaExecutable: |
47 if condaExecutable != self.__condaExecutable: |
45 Preferences.setConda("CondaExecutable", condaExecutable) |
48 Preferences.setConda("CondaExecutable", condaExecutable) |
46 |
49 |
47 import CondaInterface |
50 import CondaInterface |
|
51 |
48 CondaInterface.resetInterface() |
52 CondaInterface.resetInterface() |
49 |
53 |
50 |
54 |
51 def create(dlg): |
55 def create(dlg): |
52 """ |
56 """ |
53 Module function to create the configuration page. |
57 Module function to create the configuration page. |
54 |
58 |
55 @param dlg reference to the configuration dialog |
59 @param dlg reference to the configuration dialog |
56 @return reference to the instantiated page (ConfigurationPageBase) |
60 @return reference to the instantiated page (ConfigurationPageBase) |
57 """ |
61 """ |
58 page = CondaPage() |
62 page = CondaPage() |
59 return page |
63 return page |