19 from PyQt5.QtGui import QPixmap |
19 from PyQt5.QtGui import QPixmap |
20 from PyQt5.QtNetwork import QNetworkAccessManager, QNetworkRequest, \ |
20 from PyQt5.QtNetwork import QNetworkAccessManager, QNetworkRequest, \ |
21 QNetworkReply |
21 QNetworkReply |
22 |
22 |
23 from E5Gui import E5MessageBox |
23 from E5Gui import E5MessageBox |
|
24 from E5Gui.E5Application import e5App |
24 |
25 |
25 from E5Network.E5NetworkProxyFactory import proxyAuthenticationRequired |
26 from E5Network.E5NetworkProxyFactory import proxyAuthenticationRequired |
26 try: |
27 try: |
27 from E5Network.E5SslErrorHandler import E5SslErrorHandler |
28 from E5Network.E5SslErrorHandler import E5SslErrorHandler |
28 SSL_AVAILABLE = True |
29 SSL_AVAILABLE = True |
480 pluginObject.eric6PluginName = className |
481 pluginObject.eric6PluginName = className |
481 pluginObject.eric6PluginVersion = version |
482 pluginObject.eric6PluginVersion = version |
482 self.__onDemandInactivePlugins[name] = pluginObject |
483 self.__onDemandInactivePlugins[name] = pluginObject |
483 except PluginActivationError: |
484 except PluginActivationError: |
484 return |
485 return |
|
486 |
|
487 def initPluginToolbars(self, toolbarManager): |
|
488 """ |
|
489 Public method to initialize plug-in toolbars. |
|
490 |
|
491 @param toolbarManager reference to the toolbar manager object |
|
492 (E5ToolBarManager) |
|
493 """ |
|
494 self.initOnDemandPlugins() |
|
495 for name, ref in e5App().getPluginObjects(): |
|
496 try: |
|
497 tb = ref.initToolbar(self.__ui, toolbarManager) |
|
498 if tb is not None: |
|
499 self.__ui.addToolBar(tb) |
|
500 except AttributeError: |
|
501 # ignore it |
|
502 pass |
485 |
503 |
486 def activatePlugins(self): |
504 def activatePlugins(self): |
487 """ |
505 """ |
488 Public method to activate all plugins having the "autoactivate" |
506 Public method to activate all plugins having the "autoactivate" |
489 attribute set to True. |
507 attribute set to True. |