21 |
21 |
22 from PyQt6.QtCore import QFile, QIODevice, QObject, QUrl, pyqtSignal |
22 from PyQt6.QtCore import QFile, QIODevice, QObject, QUrl, pyqtSignal |
23 from PyQt6.QtGui import QPixmap |
23 from PyQt6.QtGui import QPixmap |
24 from PyQt6.QtNetwork import QNetworkAccessManager, QNetworkReply, QNetworkRequest |
24 from PyQt6.QtNetwork import QNetworkAccessManager, QNetworkReply, QNetworkRequest |
25 |
25 |
26 from eric7 import EricUtilities, Globals, Preferences |
26 from eric7 import EricUtilities, Preferences |
27 from eric7.EricGui import EricPixmapCache |
27 from eric7.EricGui import EricPixmapCache |
28 from eric7.EricNetwork.EricNetworkProxyFactory import proxyAuthenticationRequired |
28 from eric7.EricNetwork.EricNetworkProxyFactory import proxyAuthenticationRequired |
29 from eric7.EricWidgets import EricMessageBox |
29 from eric7.EricWidgets import EricMessageBox |
30 from eric7.EricWidgets.EricApplication import ericApp |
30 from eric7.EricWidgets.EricApplication import ericApp |
31 from eric7.EricXML.PluginRepositoryReader import PluginRepositoryReader |
31 from eric7.EricXML.PluginRepositoryReader import PluginRepositoryReader |
123 self.pluginDirs = { |
123 self.pluginDirs = { |
124 "eric7": os.path.join(getConfig("ericDir"), "Plugins"), |
124 "eric7": os.path.join(getConfig("ericDir"), "Plugins"), |
125 "global": os.path.join( |
125 "global": os.path.join( |
126 PythonUtilities.getPythonLibraryDirectory(), "eric7plugins" |
126 PythonUtilities.getPythonLibraryDirectory(), "eric7plugins" |
127 ), |
127 ), |
128 "user": os.path.join(Globals.getConfigDir(), "eric7plugins"), |
128 "user": os.path.join(EricUtilities.getConfigDir(), "eric7plugins"), |
129 } |
129 } |
130 self.__priorityOrder = ["eric7", "global", "user"] |
130 self.__priorityOrder = ["eric7", "global", "user"] |
131 |
131 |
132 self.__defaultDownloadDir = os.path.join(Globals.getConfigDir(), "Downloads") |
132 self.__defaultDownloadDir = os.path.join( |
|
133 EricUtilities.getConfigDir(), "Downloads" |
|
134 ) |
133 |
135 |
134 self.__activePlugins = {} |
136 self.__activePlugins = {} |
135 self.__inactivePlugins = {} |
137 self.__inactivePlugins = {} |
136 self.__onDemandActivePlugins = {} |
138 self.__onDemandActivePlugins = {} |
137 self.__onDemandInactivePlugins = {} |
139 self.__onDemandInactivePlugins = {} |
160 self.__loadPlugins() |
162 self.__loadPlugins() |
161 |
163 |
162 self.__checkPluginsDownloadDirectory() |
164 self.__checkPluginsDownloadDirectory() |
163 |
165 |
164 self.pluginRepositoryFile = os.path.join( |
166 self.pluginRepositoryFile = os.path.join( |
165 Globals.getConfigDir(), "PluginRepository" |
167 EricUtilities.getConfigDir(), "PluginRepository" |
166 ) |
168 ) |
167 |
169 |
168 # attributes for the network objects |
170 # attributes for the network objects |
169 self.__networkManager = QNetworkAccessManager(self) |
171 self.__networkManager = QNetworkAccessManager(self) |
170 self.__networkManager.proxyAuthenticationRequired.connect( |
172 self.__networkManager.proxyAuthenticationRequired.connect( |