56 |
56 |
57 self.translationLocalCompleter = EricDirCompleter(self.translationLocalEdit) |
57 self.translationLocalCompleter = EricDirCompleter(self.translationLocalEdit) |
58 |
58 |
59 venvManager = ericApp().getObject("VirtualEnvManager") |
59 venvManager = ericApp().getObject("VirtualEnvManager") |
60 |
60 |
61 self.venvGroupBox.setVisible(not self.project.pdata["EMBEDDED_VENV"]) |
61 self.venvGroupBox.setVisible( |
|
62 not self.project.getProjectData(dataKey="EMBEDDED_VENV") |
|
63 ) |
62 self.venvComboBox.addItem("") |
64 self.venvComboBox.addItem("") |
63 if self.project.pdata["EMBEDDED_VENV"]: |
65 if self.project.getProjectData(dataKey="EMBEDDED_VENV"): |
64 venvIndex = 0 |
66 venvIndex = 0 |
65 else: |
67 else: |
66 self.venvComboBox.addItems(sorted(venvManager.getVirtualenvNames())) |
68 self.venvComboBox.addItems(sorted(venvManager.getVirtualenvNames())) |
67 |
69 |
68 if self.project.debugProperties["VIRTUALENV"]: |
70 if self.project.debugProperties["VIRTUALENV"]: |
71 self.venvComboBox.findText( |
73 self.venvComboBox.findText( |
72 self.project.debugProperties["VIRTUALENV"] |
74 self.project.debugProperties["VIRTUALENV"] |
73 ), |
75 ), |
74 ) |
76 ) |
75 else: |
77 else: |
76 if self.project.pdata["PROGLANGUAGE"] == "Python3": |
78 if self.project.getProjectData(dataKey="PROGLANGUAGE") == "Python3": |
77 venvName = Preferences.getDebugger("Python3VirtualEnv") |
79 venvName = Preferences.getDebugger("Python3VirtualEnv") |
78 else: |
80 else: |
79 venvName = "" |
81 venvName = "" |
80 if not venvName: |
82 if not venvName: |
81 venvName, _ = venvManager.getDefaultEnvironment() |
83 venvName, _ = venvManager.getDefaultEnvironment() |
87 if self.project.debugProperties["DEBUGCLIENT"]: |
89 if self.project.debugProperties["DEBUGCLIENT"]: |
88 self.debugClientPicker.setText( |
90 self.debugClientPicker.setText( |
89 self.project.debugProperties["DEBUGCLIENT"], toNative=False |
91 self.project.debugProperties["DEBUGCLIENT"], toNative=False |
90 ) |
92 ) |
91 else: |
93 else: |
92 if self.project.pdata["PROGLANGUAGE"] == "Python3": |
94 if self.project.getProjectData(dataKey="PROGLANGUAGE") == "Python3": |
93 debugClient = os.path.join( |
95 debugClient = os.path.join( |
94 getConfig("ericDir"), "DebugClients", "Python", "DebugClient.py" |
96 getConfig("ericDir"), "DebugClients", "Python", "DebugClient.py" |
95 ) |
97 ) |
96 else: |
98 else: |
97 debugClient = "" |
99 debugClient = "" |
126 def on_debugClientPicker_aboutToShowPathPickerDialog(self): |
128 def on_debugClientPicker_aboutToShowPathPickerDialog(self): |
127 """ |
129 """ |
128 Private slot to perform actions before the debug client selection |
130 Private slot to perform actions before the debug client selection |
129 dialog is shown. |
131 dialog is shown. |
130 """ |
132 """ |
131 filters = self.project.getDebuggerFilters(self.project.pdata["PROGLANGUAGE"]) |
133 filters = self.project.getDebuggerFilters( |
|
134 self.project.getProjectData(dataKey="PROGLANGUAGE") |
|
135 ) |
132 filters += self.tr("All Files (*)") |
136 filters += self.tr("All Files (*)") |
133 self.debugClientPicker.setFilters(filters) |
137 self.debugClientPicker.setFilters(filters) |
134 |
138 |
135 def storeData(self): |
139 def storeData(self): |
136 """ |
140 """ |
140 |
144 |
141 self.project.debugProperties["DEBUGCLIENT"] = self.debugClientPicker.text( |
145 self.project.debugProperties["DEBUGCLIENT"] = self.debugClientPicker.text( |
142 toNative=False |
146 toNative=False |
143 ) |
147 ) |
144 if not self.project.debugProperties["DEBUGCLIENT"]: |
148 if not self.project.debugProperties["DEBUGCLIENT"]: |
145 if self.project.pdata["PROGLANGUAGE"] == "Python3": |
149 if self.project.getProjectData(dataKey="PROGLANGUAGE") == "Python3": |
146 debugClient = os.path.join( |
150 debugClient = os.path.join( |
147 getConfig("ericDir"), "DebugClients", "Python", "DebugClient.py" |
151 getConfig("ericDir"), "DebugClients", "Python", "DebugClient.py" |
148 ) |
152 ) |
149 else: |
153 else: |
150 debugClient = "" |
154 debugClient = "" |