--- a/src/eric7/PipInterface/PipPackagesWidget.py Mon May 05 09:20:18 2025 +0200 +++ b/src/eric7/PipInterface/PipPackagesWidget.py Mon May 05 10:17:49 2025 +0200 @@ -100,6 +100,11 @@ self.dependencyRepairButton.setIcon(EricPixmapCache.getIcon("repair")) self.dependencyRepairAllButton.setIcon(EricPixmapCache.getIcon("repairAll")) + self.includeGlobalsButton.setIcon(EricPixmapCache.getIcon("global")) + self.includeGlobalsButton.setChecked( + not Preferences.getPip("ExcludeGlobalEnvironments") + ) + self.__pip = pip self.packagesList.header().setSortIndicator( @@ -196,7 +201,7 @@ self.environmentsComboBox.addItem(projectVenv) self.environmentsComboBox.addItems( self.__pip.getVirtualenvNames( - noGlobals=Preferences.getPip("ExcludeGlobalEnvironments"), + noGlobals=not self.includeGlobalsButton.isChecked(), filterList=("+standard",), ) ) @@ -259,6 +264,19 @@ ## Slots handling widget signals below ####################################################################### + @pyqtSlot(bool) + def on_includeGlobalsButton_clicked(self, checked): + """ + Private slot to handle a change of the 'Include Global Environments' button + + @param checked current check state + @type bool + """ + Preferences.setPip( + "ExcludeGlobalEnvironments", not self.includeGlobalsButton.isChecked() + ) + self.on_refreshButton_clicked() + def __selectedUpdateableItems(self): """ Private method to get a list of selected items that can be updated.