11 from PyQt4.QtGui import QDialog, QListWidgetItem, QDesktopServices |
11 from PyQt4.QtGui import QDialog, QListWidgetItem, QDesktopServices |
12 |
12 |
13 from E5Gui import E5MessageBox |
13 from E5Gui import E5MessageBox |
14 |
14 |
15 from .Ui_GreaseMonkeyConfigurationDialog import Ui_GreaseMonkeyConfigurationDialog |
15 from .Ui_GreaseMonkeyConfigurationDialog import Ui_GreaseMonkeyConfigurationDialog |
16 |
|
17 from .GreaseMonkeyConfigurationScriptInfoDialog import \ |
|
18 GreaseMonkeyConfigurationScriptInfoDialog |
|
19 |
|
20 import Helpviewer.HelpWindow |
|
21 |
16 |
22 import UI.PixmapCache |
17 import UI.PixmapCache |
23 |
18 |
24 |
19 |
25 class GreaseMonkeyConfigurationDialog(QDialog, Ui_GreaseMonkeyConfigurationDialog): |
20 class GreaseMonkeyConfigurationDialog(QDialog, Ui_GreaseMonkeyConfigurationDialog): |
58 @pyqtSlot(str) |
53 @pyqtSlot(str) |
59 def on_downloadLabel_linkActivated(self, link): |
54 def on_downloadLabel_linkActivated(self, link): |
60 """ |
55 """ |
61 Private slot to open the userscript.org web site. |
56 Private slot to open the userscript.org web site. |
62 """ |
57 """ |
|
58 import Helpviewer.HelpWindow |
63 Helpviewer.HelpWindow.HelpWindow.mainWindow().newTab( |
59 Helpviewer.HelpWindow.HelpWindow.mainWindow().newTab( |
64 QUrl("http://www.userscript.org")) |
60 QUrl("http://www.userscript.org")) |
65 self.close() |
61 self.close() |
66 |
62 |
67 @pyqtSlot(QListWidgetItem) |
63 @pyqtSlot(QListWidgetItem) |
69 """ |
65 """ |
70 Private slot to show information about the selected script. |
66 Private slot to show information about the selected script. |
71 """ |
67 """ |
72 script = self.__getScript(item) |
68 script = self.__getScript(item) |
73 if script is not None: |
69 if script is not None: |
|
70 from .GreaseMonkeyConfigurationScriptInfoDialog import \ |
|
71 GreaseMonkeyConfigurationScriptInfoDialog |
74 infoDlg = GreaseMonkeyConfigurationScriptInfoDialog(script, self) |
72 infoDlg = GreaseMonkeyConfigurationScriptInfoDialog(script, self) |
75 infoDlg.exec_() |
73 infoDlg.exec_() |
76 |
74 |
77 def __loadScripts(self): |
75 def __loadScripts(self): |
78 """ |
76 """ |