28 |
28 |
29 def __init__(self, manager, parent=None): |
29 def __init__(self, manager, parent=None): |
30 """ |
30 """ |
31 Constructor |
31 Constructor |
32 |
32 |
33 @param manager reference to the manager object (GreaseMonkeyManager) |
33 @param manager reference to the manager object |
34 @param parent reference to the parent widget (QWidget) |
34 @type GreaseMonkeyManager |
|
35 @param parent reference to the parent widget |
|
36 @type QWidget |
35 """ |
37 """ |
36 super().__init__(parent) |
38 super().__init__(parent) |
37 self.setupUi(self) |
39 self.setupUi(self) |
38 self.setWindowFlags(Qt.WindowType.Window) |
40 self.setWindowFlags(Qt.WindowType.Window) |
39 |
41 |
56 @pyqtSlot(str) |
58 @pyqtSlot(str) |
57 def on_downloadLabel_linkActivated(self, link): |
59 def on_downloadLabel_linkActivated(self, link): |
58 """ |
60 """ |
59 Private slot to open the greasyfork.org web site. |
61 Private slot to open the greasyfork.org web site. |
60 |
62 |
61 @param link URL (string) |
63 @param link URL |
|
64 @type str |
62 """ |
65 """ |
63 from eric7.WebBrowser.WebBrowserWindow import WebBrowserWindow |
66 from eric7.WebBrowser.WebBrowserWindow import WebBrowserWindow |
64 |
67 |
65 if not link or "userscript.org" in link: |
68 if not link or "userscript.org" in link: |
66 # userscript.org is down, default to Greasy Fork. |
69 # userscript.org is down, default to Greasy Fork. |
71 @pyqtSlot(QListWidgetItem) |
74 @pyqtSlot(QListWidgetItem) |
72 def on_scriptsList_itemDoubleClicked(self, item): |
75 def on_scriptsList_itemDoubleClicked(self, item): |
73 """ |
76 """ |
74 Private slot to show information about the selected script. |
77 Private slot to show information about the selected script. |
75 |
78 |
76 @param item reference to the double clicked item (QListWidgetItem) |
79 @param item reference to the double clicked item |
|
80 @type QListWidgetItem |
77 """ |
81 """ |
78 from .GreaseMonkeyConfigurationScriptInfoDialog import ( |
82 from .GreaseMonkeyConfigurationScriptInfoDialog import ( |
79 GreaseMonkeyConfigurationScriptInfoDialog, |
83 GreaseMonkeyConfigurationScriptInfoDialog, |
80 ) |
84 ) |
81 |
85 |
131 |
135 |
132 def __getScript(self, itm): |
136 def __getScript(self, itm): |
133 """ |
137 """ |
134 Private method to get the script for the given item. |
138 Private method to get the script for the given item. |
135 |
139 |
136 @param itm item to get script for (QListWidgetItem) |
140 @param itm item to get script for |
137 @return reference to the script object (GreaseMonkeyScript) |
141 @type QListWidgetItem |
|
142 @return reference to the script object |
|
143 @rtype GreaseMonkeyScript |
138 """ |
144 """ |
139 if itm is None: |
145 if itm is None: |
140 return None |
146 return None |
141 |
147 |
142 script = itm.data(GreaseMonkeyConfigurationDialog.ScriptRole) |
148 script = itm.data(GreaseMonkeyConfigurationDialog.ScriptRole) |