WebBrowser/GreaseMonkey/GreaseMonkeyManager.py

changeset 5716
27a7c7064686
parent 5715
cbcca230679f
child 5726
e1dbd217214a
equal deleted inserted replaced
5715:cbcca230679f 5716:27a7c7064686
19 19
20 import Utilities 20 import Utilities
21 import Preferences 21 import Preferences
22 22
23 from WebBrowser.WebBrowserWindow import WebBrowserWindow 23 from WebBrowser.WebBrowserWindow import WebBrowserWindow
24 from .GreaseMonkeyUrlInterceptor import GreaseMonkeyUrlInterceptor
25 24
26 25
27 class GreaseMonkeyManager(QObject): 26 class GreaseMonkeyManager(QObject):
28 """ 27 """
29 Class implementing the manager for GreaseMonkey scripts. 28 Class implementing the manager for GreaseMonkey scripts.
40 39
41 self.__disabledScripts = [] 40 self.__disabledScripts = []
42 self.__scripts = [] 41 self.__scripts = []
43 self.__downloaders = [] 42 self.__downloaders = []
44 43
45 self.__interceptor = GreaseMonkeyUrlInterceptor(self)
46 WebBrowserWindow.networkManager().installUrlInterceptor(
47 GreaseMonkeyUrlInterceptor(self))
48
49 QTimer.singleShot(0, self.__load) 44 QTimer.singleShot(0, self.__load)
50
51 def __del__(self):
52 """
53 Special method called during object destruction.
54 """
55 WebBrowserWindow.networkManager().removeUrlInterceptor(
56 self.__interceptor)
57 45
58 def showConfigurationDialog(self, parent=None): 46 def showConfigurationDialog(self, parent=None):
59 """ 47 """
60 Public method to show the configuration dialog. 48 Public method to show the configuration dialog.
61 49

eric ide

mercurial