src/eric7/Preferences/ConfigurationPages/CondaPage.py

branch
eric7
changeset 9221
bf71ee032bb4
parent 9209
b99e7fd55fd3
child 9413
80c06d472826
equal deleted inserted replaced
9220:e9e7eca7efee 9221:bf71ee032bb4
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

eric ide

mercurial