eric7/Preferences/ConfigurationPages/DebuggerPython3Page.py

branch
eric7
changeset 8610
c9cd21bcbe33
parent 8358
144a6b854f70
child 8881
54e42bc2437a
equal deleted inserted replaced
8609:fd6b68a0a2df 8610:c9cd21bcbe33
31 self.setupUi(self) 31 self.setupUi(self)
32 self.setObjectName("DebuggerPython3Page") 32 self.setObjectName("DebuggerPython3Page")
33 33
34 try: 34 try:
35 self.__virtualenvManager = ericApp().getObject("VirtualEnvManager") 35 self.__virtualenvManager = ericApp().getObject("VirtualEnvManager")
36 self.__standalone = False
36 except KeyError: 37 except KeyError:
37 from VirtualEnv.VirtualenvManager import VirtualenvManager 38 from VirtualEnv.VirtualenvManager import VirtualenvManager
38 self.__virtualenvManager = VirtualenvManager() 39 self.__virtualenvManager = VirtualenvManager()
40 self.__standalone = True
39 41
42 self.venvDlgButton.setVisible(self.__standalone)
40 self.venvDlgButton.setIcon(UI.PixmapCache.getIcon("virtualenv")) 43 self.venvDlgButton.setIcon(UI.PixmapCache.getIcon("virtualenv"))
44
45 self.venvRefreshButton.setVisible(not self.__standalone)
46 self.venvRefreshButton.setIcon(UI.PixmapCache.getIcon("reload"))
41 47
42 self.debugClientPicker.setMode(EricPathPickerModes.OPEN_FILE_MODE) 48 self.debugClientPicker.setMode(EricPathPickerModes.OPEN_FILE_MODE)
43 self.debugClientPicker.setToolTip(self.tr( 49 self.debugClientPicker.setToolTip(self.tr(
44 "Press to select the Debug Client via a file selection dialog")) 50 "Press to select the Debug Client via a file selection dialog"))
45 self.debugClientPicker.setFilters(self.tr("Python Files (*.py *.py3)")) 51 self.debugClientPicker.setFilters(self.tr("Python Files (*.py *.py3)"))
109 @pyqtSlot() 115 @pyqtSlot()
110 def on_venvDlgButton_clicked(self): 116 def on_venvDlgButton_clicked(self):
111 """ 117 """
112 Private slot to show the virtual environment manager dialog. 118 Private slot to show the virtual environment manager dialog.
113 """ 119 """
114 self.__virtualenvManager.showVirtualenvManagerDialog(modal=True) 120 if self.__standalone:
121 self.__virtualenvManager.showVirtualenvManagerDialog(modal=True)
122 self.__populateAndSetVenvComboBox()
123 self.activateWindow()
124 self.raise_()
125
126 @pyqtSlot()
127 def on_venvRefreshButton_clicked(self):
128 """
129 Private slot to reload the list of virtual environments.
130 """
115 self.__populateAndSetVenvComboBox() 131 self.__populateAndSetVenvComboBox()
116 self.activateWindow()
117 self.raise_()
118 132
119 133
120 def create(dlg): 134 def create(dlg):
121 """ 135 """
122 Module function to create the configuration page. 136 Module function to create the configuration page.

eric ide

mercurial