eric7/PipInterface/PipPackagesWidget.py

branch
eric7
changeset 9002
31a7decd3393
parent 9001
a00cd6b55728
child 9003
6bc210cd5726
equal deleted inserted replaced
9001:a00cd6b55728 9002:31a7decd3393
1180 self.__uninstallRequirements) 1180 self.__uninstallRequirements)
1181 self.__generateRequirementsAct = self.__pipMenu.addAction( 1181 self.__generateRequirementsAct = self.__pipMenu.addAction(
1182 self.tr("Generate Requirements..."), 1182 self.tr("Generate Requirements..."),
1183 self.__generateRequirements) 1183 self.__generateRequirements)
1184 self.__pipMenu.addSeparator() 1184 self.__pipMenu.addSeparator()
1185 self.__showLicensesDialogAct = self.__pipMenu.addAction(
1186 self.tr("Show Licenses..."),
1187 self.__showLicensesDialog)
1188 self.__pipMenu.addSeparator()
1185 self.__checkVulnerabilityAct = self.__pipMenu.addAction( 1189 self.__checkVulnerabilityAct = self.__pipMenu.addAction(
1186 self.tr("Check Vulnerabilities"), 1190 self.tr("Check Vulnerabilities"),
1187 self.__updateVulnerabilityData) 1191 self.__updateVulnerabilityData)
1188 # updateVulnerabilityDbAct 1192 # updateVulnerabilityDbAct
1189 self.__pipMenu.addAction( 1193 self.__pipMenu.addAction(
1244 self.__cacheShowListAct.setEnabled(enablePipCache) 1248 self.__cacheShowListAct.setEnabled(enablePipCache)
1245 self.__cacheRemoveAct.setEnabled(enablePipCache) 1249 self.__cacheRemoveAct.setEnabled(enablePipCache)
1246 self.__cachePurgeAct.setEnabled(enablePipCache) 1250 self.__cachePurgeAct.setEnabled(enablePipCache)
1247 1251
1248 self.__editVirtualenvConfigAct.setEnabled(enable) 1252 self.__editVirtualenvConfigAct.setEnabled(enable)
1253
1249 self.__checkVulnerabilityAct.setEnabled( 1254 self.__checkVulnerabilityAct.setEnabled(
1250 enable & self.vulnerabilityCheckBox.isEnabled()) 1255 enable & self.vulnerabilityCheckBox.isEnabled())
1256
1257 self.__showLicensesDialogAct.setEnabled(enable)
1251 1258
1252 @pyqtSlot() 1259 @pyqtSlot()
1253 def __installPip(self): 1260 def __installPip(self):
1254 """ 1261 """
1255 Private slot to install pip into the selected environment. 1262 Private slot to install pip into the selected environment.
1800 """ 1807 """
1801 self.showDepPackageDetailsButton.setEnabled( 1808 self.showDepPackageDetailsButton.setEnabled(
1802 len(self.dependenciesList.selectedItems()) == 1 and 1809 len(self.dependenciesList.selectedItems()) == 1 and
1803 self.__isPipAvailable() 1810 self.__isPipAvailable()
1804 ) 1811 )
1812
1813 ##################################################################
1814 ## Interface to show the licenses dialog below
1815 ##################################################################
1816
1817 @pyqtSlot()
1818 def __showLicensesDialog(self):
1819 """
1820 Private slot to show a dialog with the licenses of the selected
1821 environment.
1822 """
1823 # TODO: not yet implemented
1824 from .PipLicensesDialog import PipLicensesDialog
1825
1826 environment = self.environmentsComboBox.currentText()
1827 dlg = PipLicensesDialog(self.__pip, environment, self)
1828 dlg.exec()

eric ide

mercurial