34 from .data import icons_rc # __IGNORE_WARNING__ |
34 from .data import icons_rc # __IGNORE_WARNING__ |
35 from .data import html_rc # __IGNORE_WARNING__ |
35 from .data import html_rc # __IGNORE_WARNING__ |
36 from .data import javascript_rc # __IGNORE_WARNING__ |
36 from .data import javascript_rc # __IGNORE_WARNING__ |
37 |
37 |
38 from E5Gui.E5Action import E5Action |
38 from E5Gui.E5Action import E5Action |
39 from E5Gui import E5MessageBox, E5FileDialog |
39 from E5Gui import E5MessageBox, E5FileDialog, E5ErrorMessage |
40 from E5Gui.E5MainWindow import E5MainWindow |
40 from E5Gui.E5MainWindow import E5MainWindow |
41 from E5Gui.E5Application import e5App |
41 from E5Gui.E5Application import e5App |
42 from E5Gui.E5ZoomWidget import E5ZoomWidget |
42 from E5Gui.E5ZoomWidget import E5ZoomWidget |
43 |
43 |
44 import Preferences |
44 import Preferences |
1029 if not self.initShortcutsOnly: |
1029 if not self.initShortcutsOnly: |
1030 self.greaseMonkeyAct.triggered[()].connect( |
1030 self.greaseMonkeyAct.triggered[()].connect( |
1031 self.__showGreaseMonkeyConfigDialog) |
1031 self.__showGreaseMonkeyConfigDialog) |
1032 self.__actions.append(self.greaseMonkeyAct) |
1032 self.__actions.append(self.greaseMonkeyAct) |
1033 |
1033 |
|
1034 self.editMessageFilterAct = E5Action(self.trUtf8('Edit Message Filters'), |
|
1035 UI.PixmapCache.getIcon("warning.png"), |
|
1036 self.trUtf8('Edit Message Filters...'), 0, 0, self, |
|
1037 'help_manage_message_filters') |
|
1038 self.editMessageFilterAct.setStatusTip(self.trUtf8( |
|
1039 'Edit the message filters used to suppress unwanted messages')) |
|
1040 self.editMessageFilterAct.setWhatsThis(self.trUtf8( |
|
1041 """<b>Edit Message Filters</b>""" |
|
1042 """<p>Opens a dialog to edit the message filters used to suppress""" |
|
1043 """ unwanted messages been shown in an error window.</p>""" |
|
1044 )) |
|
1045 if not self.initShortcutsOnly: |
|
1046 self.editMessageFilterAct.triggered[()].connect( |
|
1047 E5ErrorMessage.editMessageFilters) |
|
1048 self.__actions.append(self.editMessageFilterAct) |
|
1049 |
1034 if self.useQtHelp or self.initShortcutsOnly: |
1050 if self.useQtHelp or self.initShortcutsOnly: |
1035 self.syncTocAct = E5Action(self.trUtf8('Sync with Table of Contents'), |
1051 self.syncTocAct = E5Action(self.trUtf8('Sync with Table of Contents'), |
1036 UI.PixmapCache.getIcon("syncToc.png"), |
1052 UI.PixmapCache.getIcon("syncToc.png"), |
1037 self.trUtf8('Sync with Table of Contents'), |
1053 self.trUtf8('Sync with Table of Contents'), |
1038 0, 0, self, 'help_sync_toc') |
1054 0, 0, self, 'help_sync_toc') |
1427 menu.addAction(self.cookiesAct) |
1443 menu.addAction(self.cookiesAct) |
1428 menu.addAction(self.offlineStorageAct) |
1444 menu.addAction(self.offlineStorageAct) |
1429 menu.addAction(self.personalDataAct) |
1445 menu.addAction(self.personalDataAct) |
1430 menu.addAction(self.greaseMonkeyAct) |
1446 menu.addAction(self.greaseMonkeyAct) |
1431 menu.addSeparator() |
1447 menu.addSeparator() |
|
1448 menu.addAction(self.editMessageFilterAct) |
|
1449 menu.addSeparator() |
1432 menu.addAction(self.searchEnginesAct) |
1450 menu.addAction(self.searchEnginesAct) |
1433 menu.addSeparator() |
1451 menu.addSeparator() |
1434 menu.addAction(self.passwordsAct) |
1452 menu.addAction(self.passwordsAct) |
1435 if SSL_AVAILABLE: |
1453 if SSL_AVAILABLE: |
1436 menu.addAction(self.certificatesAct) |
1454 menu.addAction(self.certificatesAct) |
1437 menu.addSeparator() |
1455 menu.addSeparator() |
1438 menu.addAction(self.adblockAct) |
1456 menu.addAction(self.adblockAct) |
1439 menu.addAction(self.flashblockAct) |
1457 menu.addAction(self.flashblockAct) |
1440 menu.addSeparator() |
1458 menu.addSeparator() |
|
1459 self.__settingsMenu = menu |
|
1460 self.__settingsMenu.aboutToShow.connect( |
|
1461 self.__aboutToShowSettingsMenu) |
1441 |
1462 |
1442 from .UserAgent.UserAgentMenu import UserAgentMenu |
1463 from .UserAgent.UserAgentMenu import UserAgentMenu |
1443 self.__userAgentMenu = UserAgentMenu(self.trUtf8("Global User Agent")) |
1464 self.__userAgentMenu = UserAgentMenu(self.trUtf8("Global User Agent")) |
1444 menu.addMenu(self.__userAgentMenu) |
1465 menu.addMenu(self.__userAgentMenu) |
1445 menu.addAction(self.userAgentManagerAct) |
1466 menu.addAction(self.userAgentManagerAct) |
2644 @param msg message sent by the help engine (string) |
2665 @param msg message sent by the help engine (string) |
2645 """ |
2666 """ |
2646 E5MessageBox.warning(self, |
2667 E5MessageBox.warning(self, |
2647 self.trUtf8("Help Engine"), msg) |
2668 self.trUtf8("Help Engine"), msg) |
2648 |
2669 |
|
2670 def __aboutToShowSettingsMenu(self): |
|
2671 """ |
|
2672 Private slot to show the Settings menu. |
|
2673 """ |
|
2674 self.editMessageFilterAct.setEnabled(E5ErrorMessage.messageHandlerInstalled()) |
|
2675 |
2649 def __showBackMenu(self): |
2676 def __showBackMenu(self): |
2650 """ |
2677 """ |
2651 Private slot showing the backwards navigation menu. |
2678 Private slot showing the backwards navigation menu. |
2652 """ |
2679 """ |
2653 self.backMenu.clear() |
2680 self.backMenu.clear() |