97 |
97 |
98 self.refreshDependenciesButton.setIcon(EricPixmapCache.getIcon("reload")) |
98 self.refreshDependenciesButton.setIcon(EricPixmapCache.getIcon("reload")) |
99 self.showDepPackageDetailsButton.setIcon(EricPixmapCache.getIcon("info")) |
99 self.showDepPackageDetailsButton.setIcon(EricPixmapCache.getIcon("info")) |
100 self.dependencyRepairButton.setIcon(EricPixmapCache.getIcon("repair")) |
100 self.dependencyRepairButton.setIcon(EricPixmapCache.getIcon("repair")) |
101 self.dependencyRepairAllButton.setIcon(EricPixmapCache.getIcon("repairAll")) |
101 self.dependencyRepairAllButton.setIcon(EricPixmapCache.getIcon("repairAll")) |
|
102 |
|
103 self.includeGlobalsButton.setIcon(EricPixmapCache.getIcon("global")) |
|
104 self.includeGlobalsButton.setChecked( |
|
105 not Preferences.getPip("ExcludeGlobalEnvironments") |
|
106 ) |
102 |
107 |
103 self.__pip = pip |
108 self.__pip = pip |
104 |
109 |
105 self.packagesList.header().setSortIndicator( |
110 self.packagesList.header().setSortIndicator( |
106 PipPackagesWidget.PackageColumn, Qt.SortOrder.AscendingOrder |
111 PipPackagesWidget.PackageColumn, Qt.SortOrder.AscendingOrder |
194 projectVenv = self.__pip.getProjectEnvironmentString() |
199 projectVenv = self.__pip.getProjectEnvironmentString() |
195 if projectVenv: |
200 if projectVenv: |
196 self.environmentsComboBox.addItem(projectVenv) |
201 self.environmentsComboBox.addItem(projectVenv) |
197 self.environmentsComboBox.addItems( |
202 self.environmentsComboBox.addItems( |
198 self.__pip.getVirtualenvNames( |
203 self.__pip.getVirtualenvNames( |
199 noGlobals=Preferences.getPip("ExcludeGlobalEnvironments"), |
204 noGlobals=not self.includeGlobalsButton.isChecked(), |
200 filterList=("+standard",), |
205 filterList=("+standard",), |
201 ) |
206 ) |
202 ) |
207 ) |
203 |
208 |
204 def __isPipAvailable(self): |
209 def __isPipAvailable(self): |
256 return self.__pip |
261 return self.__pip |
257 |
262 |
258 ####################################################################### |
263 ####################################################################### |
259 ## Slots handling widget signals below |
264 ## Slots handling widget signals below |
260 ####################################################################### |
265 ####################################################################### |
|
266 |
|
267 @pyqtSlot(bool) |
|
268 def on_includeGlobalsButton_clicked(self, checked): |
|
269 """ |
|
270 Private slot to handle a change of the 'Include Global Environments' button |
|
271 |
|
272 @param checked current check state |
|
273 @type bool |
|
274 """ |
|
275 Preferences.setPip( |
|
276 "ExcludeGlobalEnvironments", not self.includeGlobalsButton.isChecked() |
|
277 ) |
|
278 self.on_refreshButton_clicked() |
261 |
279 |
262 def __selectedUpdateableItems(self): |
280 def __selectedUpdateableItems(self): |
263 """ |
281 """ |
264 Private method to get a list of selected items that can be updated. |
282 Private method to get a list of selected items that can be updated. |
265 |
283 |