Plugins/UiExtensionPlugins/PipInterface/PipSearchDialog.py

changeset 6257
4523c5e6dd43
parent 6155
ae44225e7e7c
child 6287
9a193ff6d24a
equal deleted inserted replaced
6253:a148632e9610 6257:4523c5e6dd43
21 except ImportError: 21 except ImportError:
22 from .E5XmlRpcClient import E5XmlRpcClient 22 from .E5XmlRpcClient import E5XmlRpcClient
23 23
24 from .Ui_PipSearchDialog import Ui_PipSearchDialog 24 from .Ui_PipSearchDialog import Ui_PipSearchDialog
25 25
26 from . import DefaultIndexUrl 26 from . import DefaultIndexUrlXml
27 27
28 28
29 class PipSearchDialog(QDialog, Ui_PipSearchDialog): 29 class PipSearchDialog(QDialog, Ui_PipSearchDialog):
30 """ 30 """
31 Class implementing a dialog to search PyPI. 31 Class implementing a dialog to search PyPI.
61 self.__showDetailsButton = self.buttonBox.addButton( 61 self.__showDetailsButton = self.buttonBox.addButton(
62 self.tr("&Show Details..."), QDialogButtonBox.ActionRole) 62 self.tr("&Show Details..."), QDialogButtonBox.ActionRole)
63 self.__showDetailsButton.setEnabled(False) 63 self.__showDetailsButton.setEnabled(False)
64 64
65 self.__pip = pip 65 self.__pip = pip
66 self.__client = E5XmlRpcClient( 66 if plugin.getPreferences("PipSearchIndex"):
67 plugin.getPreferences("PipSearchIndex") or DefaultIndexUrl, 67 indexUrl = plugin.getPreferences("PipSearchIndex") + "/pypi"
68 self) 68 else:
69 indexUrl = DefaultIndexUrlXml
70 self.__client = E5XmlRpcClient(indexUrl, self)
69 71
70 self.__default = self.tr("<Default>") 72 self.__default = self.tr("<Default>")
71 pipExecutables = sorted(plugin.getPreferences("PipExecutables")) 73 pipExecutables = sorted(plugin.getPreferences("PipExecutables"))
72 self.pipComboBox.addItem(self.__default) 74 self.pipComboBox.addItem(self.__default)
73 self.pipComboBox.addItems(pipExecutables) 75 self.pipComboBox.addItems(pipExecutables)

eric ide

mercurial