Helpviewer/HelpWindow.py

Wed, 01 Jan 2014 14:38:45 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 01 Jan 2014 14:38:45 +0100
changeset 3160
209a07d7e401
parent 3077
8d2e69e02e19
child 3178
f25fc1364c88
child 3190
a9a94491c4fd
child 3237
062e7224e5be
permissions
-rw-r--r--

Updated copyright for 2014.

0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
3160
209a07d7e401 Updated copyright for 2014.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3077
diff changeset
3 # Copyright (c) 2002 - 2014 Detlev Offenbach <detlev@die-offenbachs.de>
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 Module implementing the helpviewer main window.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
10 import os
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
11
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
12 from PyQt4.QtCore import pyqtSlot, pyqtSignal, Qt, QByteArray, QSize, QTimer, \
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
13 QUrl, QThread, QTextCodec
2101
5bac7dee9e1a Introduced the E5MainWindow class allowing to set a style for all the main windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2100
diff changeset
14 from PyQt4.QtGui import QWidget, QVBoxLayout, QSizePolicy, QDockWidget, \
1651
bc68f24d5658 Added the ClickToFlash plug-in to (temporarily) block Flash and related content.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1645
diff changeset
15 QDesktopServices, QKeySequence, QComboBox, QFont, QFontMetrics, QLabel, \
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
16 QSplitter, QMenu, QToolButton, QLineEdit, QApplication, QWhatsThis, \
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
17 QDialog, QHBoxLayout, QProgressBar, QAction, QIcon
1953
26aa6fd94dc2 Added support for GreaseMonkey scripts.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1945
diff changeset
18 from PyQt4.QtNetwork import QNetworkAccessManager, QNetworkRequest
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
19 from PyQt4.QtWebKit import QWebSettings, QWebDatabase, QWebSecurityOrigin, \
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
20 QWebPage
2411
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
21 try:
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
22 from PyQt4.QtHelp import QHelpEngine, QHelpEngineCore, QHelpSearchQuery
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
23 QTHELP_AVAILABLE = True
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
24 except ImportError:
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
25 QTHELP_AVAILABLE = False
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
26
2400
c1726b754f96 Started with delaying the import upon the time it is needed.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2361
diff changeset
27 from .Network.NetworkAccessManager import SSL_AVAILABLE
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
28
1670
6fd889391d2c Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1665
diff changeset
29 from .data import icons_rc # __IGNORE_WARNING__
6fd889391d2c Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1665
diff changeset
30 from .data import html_rc # __IGNORE_WARNING__
6fd889391d2c Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1665
diff changeset
31 from .data import javascript_rc # __IGNORE_WARNING__
1665
b248526d3a1b Reworked some stuff in the web browser to use Qt resources.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1651
diff changeset
32
55
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 54
diff changeset
33 from E5Gui.E5Action import E5Action
2697
1cd7fa670b05 Added a dialog to edit the list of unwanted error messages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2411
diff changeset
34 from E5Gui import E5MessageBox, E5FileDialog, E5ErrorMessage
2101
5bac7dee9e1a Introduced the E5MainWindow class allowing to set a style for all the main windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2100
diff changeset
35 from E5Gui.E5MainWindow import E5MainWindow
2192
61b3849df76d Changed a few places to use the new notification system.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2149
diff changeset
36 from E5Gui.E5Application import e5App
2334
fc69ad77e18a Introduced a zoom widget in the status bar of several windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
37 from E5Gui.E5ZoomWidget import E5ZoomWidget
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
38
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
39 import Preferences
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
40 from Preferences import Shortcuts
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
41
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
42 import Utilities
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
43
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
44 import UI.PixmapCache
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
45 import UI.Config
1580
7495b3e892a9 Enhanced the web browser about box and corrected the behavior of the web browser full screen toolbutton.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1562
diff changeset
46 from UI.Info import Version
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
47
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
48
2101
5bac7dee9e1a Introduced the E5MainWindow class allowing to set a style for all the main windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2100
diff changeset
49 class HelpWindow(E5MainWindow):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
50 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
51 Class implementing the web browser main window.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
52
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
53 @signal helpClosed() emitted after the window was requested to close down
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
54 @signal zoomTextOnlyChanged(bool) emitted after the zoom text only setting
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
55 was changed
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
56 """
487
4d41d03d3d00 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 464
diff changeset
57 zoomTextOnlyChanged = pyqtSignal(bool)
4d41d03d3d00 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 464
diff changeset
58 helpClosed = pyqtSignal()
653
0540f3c52b46 Changed the web browser to give it a more modern look.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 638
diff changeset
59 privacyChanged = pyqtSignal(bool)
487
4d41d03d3d00 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 464
diff changeset
60
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
61 helpwindows = []
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
62
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
63 maxMenuFilePathLen = 75
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
64
2192
61b3849df76d Changed a few places to use the new notification system.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2149
diff changeset
65 _fromEric = False
2411
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
66 useQtHelp = QTHELP_AVAILABLE
2192
61b3849df76d Changed a few places to use the new notification system.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2149
diff changeset
67
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
68 _networkAccessManager = None
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
69 _cookieJar = None
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
70 _helpEngine = None
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
71 _bookmarksManager = None
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
72 _historyManager = None
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
73 _passwordManager = None
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
74 _adblockManager = None
668
b0061a6f7484 Added a download manager to the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 653
diff changeset
75 _downloadManager = None
1415
28fa9633d57e Added a dialog to show RSS feeds.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1337
diff changeset
76 _feedsManager = None
1596
8d59e4f3c828 Extended the User Agent handling to be able to set the string on a host basis (next to the global user agent string).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1586
diff changeset
77 _userAgentsManager = None
1626
a77c8ea8582c Added capability to synchronise bookmarks, history, passwords and user agent settings via an FTP server.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1620
diff changeset
78 _syncManager = None
1670
6fd889391d2c Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1665
diff changeset
79 _speedDial = None
1945
47016f5af3b8 Enhanced the web browser by adding a personal information manager to assist in completing form fields through field context menu entries or by pressing Ctrl+Return/Ctrl+Enter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1913
diff changeset
80 _personalInformationManager = None
1953
26aa6fd94dc2 Added support for GreaseMonkey scripts.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1945
diff changeset
81 _greaseMonkeyManager = None
2192
61b3849df76d Changed a few places to use the new notification system.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2149
diff changeset
82 _notification = None
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
83
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
84 def __init__(self, home, path, parent, name, fromEric=False,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
85 initShortcutsOnly=False, searchWord=None):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
86 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
87 Constructor
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
88
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
89 @param home the URL to be shown (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
90 @param path the path of the working dir (usually '.') (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
91 @param parent parent widget of this window (QWidget)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
92 @param name name of this window (string)
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
93 @param fromEric flag indicating whether it was called from within
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
94 eric5 (boolean)
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
95 @keyparam initShortcutsOnly flag indicating to just initialize the
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
96 keyboard shortcuts (boolean)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
97 @keyparam searchWord word to search for (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
98 """
1131
7781e396c903 Changed the code to use super() to access the superclass.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1127
diff changeset
99 super().__init__(parent)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
100 self.setObjectName(name)
15
f6ccc31d6e72 Started to rename stuff for eric5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 13
diff changeset
101 self.setWindowTitle(self.trUtf8("eric5 Web Browser"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
102
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
103 self.fromEric = fromEric
2192
61b3849df76d Changed a few places to use the new notification system.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2149
diff changeset
104 self.__class__._fromEric = fromEric
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
105 self.initShortcutsOnly = initShortcutsOnly
1580
7495b3e892a9 Enhanced the web browser about box and corrected the behavior of the web browser full screen toolbutton.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1562
diff changeset
106 self.setWindowIcon(UI.PixmapCache.getIcon("ericWeb.png"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
107
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
108 self.mHistory = []
934
657269549914 Changed the configuration dialog to remember the last show page name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 923
diff changeset
109 self.__lastConfigurationPageName = ""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
110
952
cc3e2e5558e9 Added support for access keys and drag & drop to the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
111 self.__eventMouseButtons = Qt.NoButton
cc3e2e5558e9 Added support for access keys and drag & drop to the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
112 self.__eventKeyboardModifiers = Qt.NoModifier
cc3e2e5558e9 Added support for access keys and drag & drop to the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 945
diff changeset
113
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
114 if self.initShortcutsOnly:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
115 self.__initActions()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
116 else:
2400
c1726b754f96 Started with delaying the import upon the time it is needed.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2361
diff changeset
117 from .SearchWidget import SearchWidget
c1726b754f96 Started with delaying the import upon the time it is needed.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2361
diff changeset
118 from .HelpTocWidget import HelpTocWidget
c1726b754f96 Started with delaying the import upon the time it is needed.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2361
diff changeset
119 from .HelpIndexWidget import HelpIndexWidget
c1726b754f96 Started with delaying the import upon the time it is needed.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2361
diff changeset
120 from .HelpSearchWidget import HelpSearchWidget
c1726b754f96 Started with delaying the import upon the time it is needed.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2361
diff changeset
121 from .HelpBrowserWV import HelpBrowser
c1726b754f96 Started with delaying the import upon the time it is needed.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2361
diff changeset
122 from .HelpTabWidget import HelpTabWidget
c1726b754f96 Started with delaying the import upon the time it is needed.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2361
diff changeset
123 from .AdBlock.AdBlockIcon import AdBlockIcon
c1726b754f96 Started with delaying the import upon the time it is needed.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2361
diff changeset
124 from .VirusTotalApi import VirusTotalAPI
c1726b754f96 Started with delaying the import upon the time it is needed.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2361
diff changeset
125
2411
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
126 HelpWindow.setUseQtHelp(self.fromEric)
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
127
2100
fb16f4650860 Added a style sheet file to disable single click activation and an interface configuration page for the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2099
diff changeset
128 if not self.fromEric:
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
129 self.setStyle(Preferences.getUI("Style"),
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
130 Preferences.getUI("StyleSheet"))
2100
fb16f4650860 Added a style sheet file to disable single click activation and an interface configuration page for the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2099
diff changeset
131
2411
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
132 if self.useQtHelp:
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
133 self.__helpEngine = \
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
134 QHelpEngine(os.path.join(Utilities.getConfigDir(),
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
135 "browser", "eric5help.qhc"), self)
2831
05fcdce02b94 Added code to remove non-existing help files from the help collection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2824
diff changeset
136 self.__removeOldDocumentation()
2411
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
137 self.__helpEngine.warning.connect(self.__warning)
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
138 else:
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
139 self.__helpEngine = None
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
140 self.__helpInstaller = None
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
141
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
142 self.__zoomWidget = E5ZoomWidget(
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
143 UI.PixmapCache.getPixmap("zoomOut.png"),
2334
fc69ad77e18a Introduced a zoom widget in the status bar of several windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
144 UI.PixmapCache.getPixmap("zoomIn.png"),
fc69ad77e18a Introduced a zoom widget in the status bar of several windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
145 UI.PixmapCache.getPixmap("zoomReset.png"), self)
fc69ad77e18a Introduced a zoom widget in the status bar of several windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
146 self.statusBar().addPermanentWidget(self.__zoomWidget)
fc69ad77e18a Introduced a zoom widget in the status bar of several windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
147 self.__zoomWidget.setMapping(
fc69ad77e18a Introduced a zoom widget in the status bar of several windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
148 HelpBrowser.ZoomLevels, HelpBrowser.ZoomLevelDefault)
fc69ad77e18a Introduced a zoom widget in the status bar of several windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
149 self.__zoomWidget.valueChanged.connect(self.__zoomValueChanged)
fc69ad77e18a Introduced a zoom widget in the status bar of several windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
150
638
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
151 self.tabWidget = HelpTabWidget(self)
492
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 487
diff changeset
152 self.tabWidget.currentChanged[int].connect(self.__currentChanged)
638
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
153 self.tabWidget.titleChanged.connect(self.__titleChanged)
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
154 self.tabWidget.showMessage.connect(self.statusBar().showMessage)
1196
77da430b4080 Added an action to preview the file in the eric web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1170
diff changeset
155 self.tabWidget.browserClosed.connect(self.__browserClosed)
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
156 self.tabWidget.browserZoomValueChanged.connect(
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
157 self.__zoomWidget.setValue)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
158
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
159 self.findDlg = SearchWidget(self, self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
160 centralWidget = QWidget()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
161 layout = QVBoxLayout()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
162 layout.setContentsMargins(1, 1, 1, 1)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
163 layout.addWidget(self.tabWidget)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
164 layout.addWidget(self.findDlg)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
165 self.tabWidget.setSizePolicy(
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
166 QSizePolicy.Preferred, QSizePolicy.Expanding)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
167 centralWidget.setLayout(layout)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
168 self.setCentralWidget(centralWidget)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
169 self.findDlg.hide()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
170
2411
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
171 if self.useQtHelp:
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
172 # setup the TOC widget
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
173 self.__tocWindow = HelpTocWidget(self.__helpEngine, self)
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
174 self.__tocDock = QDockWidget(self.trUtf8("Contents"), self)
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
175 self.__tocDock.setObjectName("TocWindow")
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
176 self.__tocDock.setWidget(self.__tocWindow)
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
177 self.addDockWidget(Qt.LeftDockWidgetArea, self.__tocDock)
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
178
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
179 # setup the index widget
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
180 self.__indexWindow = HelpIndexWidget(self.__helpEngine, self)
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
181 self.__indexDock = QDockWidget(self.trUtf8("Index"), self)
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
182 self.__indexDock.setObjectName("IndexWindow")
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
183 self.__indexDock.setWidget(self.__indexWindow)
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
184 self.addDockWidget(Qt.LeftDockWidgetArea, self.__indexDock)
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
185
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
186 # setup the search widget
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
187 self.__searchWord = searchWord
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
188 self.__indexing = False
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
189 self.__indexingProgress = None
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
190 self.__searchEngine = self.__helpEngine.searchEngine()
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
191 self.__searchEngine.indexingStarted.connect(
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
192 self.__indexingStarted)
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
193 self.__searchEngine.indexingFinished.connect(
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
194 self.__indexingFinished)
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
195 self.__searchWindow = HelpSearchWidget(
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
196 self.__searchEngine, self)
2411
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
197 self.__searchDock = QDockWidget(self.trUtf8("Search"), self)
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
198 self.__searchDock.setObjectName("SearchWindow")
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
199 self.__searchDock.setWidget(self.__searchWindow)
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
200 self.addDockWidget(Qt.LeftDockWidgetArea, self.__searchDock)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
201
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
202 if Preferences.getHelp("SaveGeometry"):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
203 g = Preferences.getGeometry("HelpViewerGeometry")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
204 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
205 g = QByteArray()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
206 if g.isEmpty():
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
207 s = QSize(800, 800)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
208 self.resize(s)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
209 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
210 self.restoreGeometry(g)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
211
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
212 self.__setIconDatabasePath()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
213 self.__initWebSettings()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
214
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
215 self.__initActions()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
216 self.__initMenus()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
217 self.__initToolbars()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
218
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
219 self.historyManager()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
220
1680
28e57079dab5 Added capability to encrypt the synchronized data (web browser).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1670
diff changeset
221 syncMgr = self.syncManager()
28e57079dab5 Added capability to encrypt the synchronized data (web browser).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1670
diff changeset
222 syncMgr.syncMessage.connect(self.statusBar().showMessage)
28e57079dab5 Added capability to encrypt the synchronized data (web browser).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1670
diff changeset
223 syncMgr.syncError.connect(self.statusBar().showMessage)
1626
a77c8ea8582c Added capability to synchronise bookmarks, history, passwords and user agent settings via an FTP server.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1620
diff changeset
224
638
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
225 self.tabWidget.newBrowser(home)
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
226 self.tabWidget.currentBrowser().setFocus()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
227
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
228 self.__class__.helpwindows.append(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
229
1972
5341662d6cfb Added support for AdBlock exceptions to the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1970
diff changeset
230 self.__adBlockIcon = AdBlockIcon(self)
5341662d6cfb Added support for AdBlock exceptions to the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1970
diff changeset
231 self.statusBar().addPermanentWidget(self.__adBlockIcon)
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
232 self.__adBlockIcon.setEnabled(
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
233 Preferences.getHelp("AdBlockEnabled"))
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
234 self.tabWidget.currentChanged[int].connect(
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
235 self.__adBlockIcon.currentChanged)
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
236 self.tabWidget.sourceChanged.connect(
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
237 self.__adBlockIcon.sourceChanged)
1972
5341662d6cfb Added support for AdBlock exceptions to the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1970
diff changeset
238
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
239 QDesktopServices.setUrlHandler("http", self.__linkActivated)
8
0ae9bd4d2993 Fixed a few bugs introduced introduced by the change to the QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7
diff changeset
240 QDesktopServices.setUrlHandler("https", self.__linkActivated)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
241
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
242 # setup connections
2099
afde0e9110f7 Implemented guards against double activation of list entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2071
diff changeset
243 self.__activating = False
2411
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
244 if self.useQtHelp:
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
245 # TOC window
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
246 self.__tocWindow.linkActivated.connect(self.__linkActivated)
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
247 self.__tocWindow.escapePressed.connect(
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
248 self.__activateCurrentBrowser)
2411
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
249 # index window
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
250 self.__indexWindow.linkActivated.connect(self.__linkActivated)
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
251 self.__indexWindow.linksActivated.connect(
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
252 self.__linksActivated)
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
253 self.__indexWindow.escapePressed.connect(
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
254 self.__activateCurrentBrowser)
2411
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
255 # search window
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
256 self.__searchWindow.linkActivated.connect(
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
257 self.__linkActivated)
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
258 self.__searchWindow.escapePressed.connect(
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
259 self.__activateCurrentBrowser)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
260
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
261 state = Preferences.getHelp("HelpViewerState")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
262 self.restoreState(state)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
263
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
264 self.__initHelpDb()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
265
979
0ae0c8852d31 Refined the VirusTotal code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 978
diff changeset
266 self.__virusTotal = VirusTotalAPI(self)
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
267 self.__virusTotal.submitUrlError.connect(
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
268 self.__virusTotalSubmitUrlError)
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
269 self.__virusTotal.urlScanReport.connect(
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
270 self.__virusTotalUrlScanReport)
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
271 self.__virusTotal.fileScanReport.connect(
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
272 self.__virusTotalFileScanReport)
979
0ae0c8852d31 Refined the VirusTotal code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 978
diff changeset
273
1196
77da430b4080 Added an action to preview the file in the eric web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1170
diff changeset
274 self.__previewer = None
2149
bd0bbb3043df Fixed a shutdown issue.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2101
diff changeset
275 self.__shutdownCalled = False
1196
77da430b4080 Added an action to preview the file in the eric web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1170
diff changeset
276
2411
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
277 if self.useQtHelp:
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
278 QTimer.singleShot(0, self.__lookForNewDocumentation)
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
279 if self.__searchWord is not None:
aec0a8a6e548 Removed the QtHelp dependancy; support is only available, if the QtHelp module could be imported.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
280 QTimer.singleShot(0, self.__searchForWord)
1700
40c911b8c0dd Made the speed dial settings synchronizable via the sync manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1699
diff changeset
281
40c911b8c0dd Made the speed dial settings synchronizable via the sync manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1699
diff changeset
282 QTimer.singleShot(0, syncMgr.loadSettings)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
283
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
284 def __setIconDatabasePath(self, enable=True):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
285 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
286 Private method to set the favicons path.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
287
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
288 @param enable flag indicating to enabled icon storage (boolean)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
289 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
290 if enable:
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
291 iconDatabasePath = os.path.join(Utilities.getConfigDir(),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
292 "browser", "favicons")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
293 if not os.path.exists(iconDatabasePath):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
294 os.makedirs(iconDatabasePath)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
295 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
296 iconDatabasePath = "" # setting an empty path disables it
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
297 QWebSettings.setIconDatabasePath(iconDatabasePath)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
298
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
299 def __initWebSettings(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
300 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
301 Private method to set the global web settings.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
302 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
303 standardFont = Preferences.getHelp("StandardFont")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
304 fixedFont = Preferences.getHelp("FixedFont")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
305
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
306 settings = QWebSettings.globalSettings()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
307 settings.setAttribute(QWebSettings.DeveloperExtrasEnabled, True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
308
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
309 settings.setFontFamily(QWebSettings.StandardFont,
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
310 standardFont.family())
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
311 settings.setFontSize(QWebSettings.DefaultFontSize,
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
312 standardFont.pointSize())
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
313 settings.setFontFamily(QWebSettings.FixedFont, fixedFont.family())
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
314 settings.setFontSize(QWebSettings.DefaultFixedFontSize,
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
315 fixedFont.pointSize())
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
316
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
317 styleSheet = Preferences.getHelp("UserStyleSheet")
1970
02cf3bac079b Rewrote huge part of AdBlock to speed up and added support for dependent AdBlock subscriptions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1965
diff changeset
318 settings.setUserStyleSheetUrl(self.__userStyleSheet(styleSheet))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
319
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
320 settings.setAttribute(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
321 QWebSettings.AutoLoadImages,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
322 Preferences.getHelp("AutoLoadImages"))
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
323 settings.setAttribute(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
324 QWebSettings.JavaEnabled,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
325 Preferences.getHelp("JavaEnabled"))
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
326 settings.setAttribute(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
327 QWebSettings.JavascriptEnabled,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
328 Preferences.getHelp("JavaScriptEnabled"))
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
329 settings.setAttribute(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
330 QWebSettings.JavascriptCanOpenWindows,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
331 Preferences.getHelp("JavaScriptCanOpenWindows"))
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
332 settings.setAttribute(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
333 QWebSettings.JavascriptCanAccessClipboard,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
334 Preferences.getHelp("JavaScriptCanAccessClipboard"))
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
335 settings.setAttribute(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
336 QWebSettings.PluginsEnabled,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
337 Preferences.getHelp("PluginsEnabled"))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
338
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
339 if hasattr(QWebSettings, "PrintElementBackgrounds"):
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
340 settings.setAttribute(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
341 QWebSettings.PrintElementBackgrounds,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
342 Preferences.getHelp("PrintBackgrounds"))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
343
350
db40effc5c65 Added support for Web SQL Databases to the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 319
diff changeset
344 if hasattr(QWebSettings, "setOfflineStoragePath"):
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
345 settings.setAttribute(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
346 QWebSettings.OfflineStorageDatabaseEnabled,
350
db40effc5c65 Added support for Web SQL Databases to the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 319
diff changeset
347 Preferences.getHelp("OfflineStorageDatabaseEnabled"))
db40effc5c65 Added support for Web SQL Databases to the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 319
diff changeset
348 webDatabaseDir = os.path.join(
db40effc5c65 Added support for Web SQL Databases to the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 319
diff changeset
349 Utilities.getConfigDir(), "browser", "webdatabases")
db40effc5c65 Added support for Web SQL Databases to the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 319
diff changeset
350 if not os.path.exists(webDatabaseDir):
db40effc5c65 Added support for Web SQL Databases to the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 319
diff changeset
351 os.makedirs(webDatabaseDir)
db40effc5c65 Added support for Web SQL Databases to the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 319
diff changeset
352 settings.setOfflineStoragePath(webDatabaseDir)
db40effc5c65 Added support for Web SQL Databases to the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 319
diff changeset
353 settings.setOfflineStorageDefaultQuota(
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3022
diff changeset
354 Preferences.getHelp("OfflineStorageDatabaseQuota") *
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
355 1024 * 1024)
350
db40effc5c65 Added support for Web SQL Databases to the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 319
diff changeset
356
355
c29c8b8dadf1 Added support for Web application caches and local web storage to the web browser (needs Qt >= 4.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 354
diff changeset
357 if hasattr(QWebSettings, "OfflineWebApplicationCacheEnabled"):
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
358 settings.setAttribute(
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
359 QWebSettings.OfflineWebApplicationCacheEnabled,
355
c29c8b8dadf1 Added support for Web application caches and local web storage to the web browser (needs Qt >= 4.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 354
diff changeset
360 Preferences.getHelp("OfflineWebApplicationCacheEnabled"))
c29c8b8dadf1 Added support for Web application caches and local web storage to the web browser (needs Qt >= 4.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 354
diff changeset
361 appCacheDir = os.path.join(
c29c8b8dadf1 Added support for Web application caches and local web storage to the web browser (needs Qt >= 4.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 354
diff changeset
362 Utilities.getConfigDir(), "browser", "webappcaches")
c29c8b8dadf1 Added support for Web application caches and local web storage to the web browser (needs Qt >= 4.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 354
diff changeset
363 if not os.path.exists(appCacheDir):
c29c8b8dadf1 Added support for Web application caches and local web storage to the web browser (needs Qt >= 4.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 354
diff changeset
364 os.makedirs(appCacheDir)
c29c8b8dadf1 Added support for Web application caches and local web storage to the web browser (needs Qt >= 4.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 354
diff changeset
365 settings.setOfflineWebApplicationCachePath(appCacheDir)
c29c8b8dadf1 Added support for Web application caches and local web storage to the web browser (needs Qt >= 4.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 354
diff changeset
366 settings.setOfflineWebApplicationCacheQuota(
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3022
diff changeset
367 Preferences.getHelp("OfflineWebApplicationCacheQuota") *
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
368 1024 * 1024)
355
c29c8b8dadf1 Added support for Web application caches and local web storage to the web browser (needs Qt >= 4.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 354
diff changeset
369
c29c8b8dadf1 Added support for Web application caches and local web storage to the web browser (needs Qt >= 4.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 354
diff changeset
370 if hasattr(QWebSettings, "LocalStorageEnabled"):
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
371 settings.setAttribute(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
372 QWebSettings.LocalStorageEnabled,
355
c29c8b8dadf1 Added support for Web application caches and local web storage to the web browser (needs Qt >= 4.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 354
diff changeset
373 Preferences.getHelp("LocalStorageEnabled"))
c29c8b8dadf1 Added support for Web application caches and local web storage to the web browser (needs Qt >= 4.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 354
diff changeset
374 localStorageDir = os.path.join(
c29c8b8dadf1 Added support for Web application caches and local web storage to the web browser (needs Qt >= 4.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 354
diff changeset
375 Utilities.getConfigDir(), "browser", "weblocalstorage")
c29c8b8dadf1 Added support for Web application caches and local web storage to the web browser (needs Qt >= 4.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 354
diff changeset
376 if not os.path.exists(localStorageDir):
c29c8b8dadf1 Added support for Web application caches and local web storage to the web browser (needs Qt >= 4.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 354
diff changeset
377 os.makedirs(localStorageDir)
c29c8b8dadf1 Added support for Web application caches and local web storage to the web browser (needs Qt >= 4.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 354
diff changeset
378 settings.setLocalStoragePath(localStorageDir)
c29c8b8dadf1 Added support for Web application caches and local web storage to the web browser (needs Qt >= 4.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 354
diff changeset
379
354
f80d88e87677 Added option to use DNS prefetching to the web browser (needs Qt >= 4.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 350
diff changeset
380 if hasattr(QWebSettings, "DnsPrefetchEnabled"):
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
381 settings.setAttribute(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
382 QWebSettings.DnsPrefetchEnabled,
354
f80d88e87677 Added option to use DNS prefetching to the web browser (needs Qt >= 4.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 350
diff changeset
383 Preferences.getHelp("DnsPrefetchEnabled"))
f80d88e87677 Added option to use DNS prefetching to the web browser (needs Qt >= 4.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 350
diff changeset
384
381
64ae9e09d8bc Extended the Ad-Blocker of the web browser and added capability to configure the text encoding of the web browser (needs Qt >= 4.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 355
diff changeset
385 if hasattr(QWebSettings, "defaultTextEncoding"):
64ae9e09d8bc Extended the Ad-Blocker of the web browser and added capability to configure the text encoding of the web browser (needs Qt >= 4.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 355
diff changeset
386 settings.setDefaultTextEncoding(
64ae9e09d8bc Extended the Ad-Blocker of the web browser and added capability to configure the text encoding of the web browser (needs Qt >= 4.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 355
diff changeset
387 Preferences.getHelp("DefaultTextEncoding"))
64ae9e09d8bc Extended the Ad-Blocker of the web browser and added capability to configure the text encoding of the web browser (needs Qt >= 4.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 355
diff changeset
388
1337
95ceea538e4c Started to implement a few more browser options for the eric web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1232
diff changeset
389 if hasattr(QWebSettings, "SpatialNavigationEnabled"):
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
390 settings.setAttribute(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
391 QWebSettings.SpatialNavigationEnabled,
1337
95ceea538e4c Started to implement a few more browser options for the eric web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1232
diff changeset
392 Preferences.getHelp("SpatialNavigationEnabled"))
95ceea538e4c Started to implement a few more browser options for the eric web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1232
diff changeset
393 if hasattr(QWebSettings, "LinksIncludedInFocusChain"):
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
394 settings.setAttribute(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
395 QWebSettings.LinksIncludedInFocusChain,
1337
95ceea538e4c Started to implement a few more browser options for the eric web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1232
diff changeset
396 Preferences.getHelp("LinksIncludedInFocusChain"))
95ceea538e4c Started to implement a few more browser options for the eric web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1232
diff changeset
397 if hasattr(QWebSettings, "LocalContentCanAccessRemoteUrls"):
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
398 settings.setAttribute(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
399 QWebSettings.LocalContentCanAccessRemoteUrls,
1337
95ceea538e4c Started to implement a few more browser options for the eric web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1232
diff changeset
400 Preferences.getHelp("LocalContentCanAccessRemoteUrls"))
95ceea538e4c Started to implement a few more browser options for the eric web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1232
diff changeset
401 if hasattr(QWebSettings, "LocalContentCanAccessFileUrls"):
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
402 settings.setAttribute(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
403 QWebSettings.LocalContentCanAccessFileUrls,
1337
95ceea538e4c Started to implement a few more browser options for the eric web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1232
diff changeset
404 Preferences.getHelp("LocalContentCanAccessFileUrls"))
95ceea538e4c Started to implement a few more browser options for the eric web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1232
diff changeset
405 if hasattr(QWebSettings, "XSSAuditingEnabled"):
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
406 settings.setAttribute(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
407 QWebSettings.XSSAuditingEnabled,
1337
95ceea538e4c Started to implement a few more browser options for the eric web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1232
diff changeset
408 Preferences.getHelp("XSSAuditingEnabled"))
95ceea538e4c Started to implement a few more browser options for the eric web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1232
diff changeset
409 if hasattr(QWebSettings, "SiteSpecificQuirksEnabled"):
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
410 settings.setAttribute(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
411 QWebSettings.SiteSpecificQuirksEnabled,
1337
95ceea538e4c Started to implement a few more browser options for the eric web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1232
diff changeset
412 Preferences.getHelp("SiteSpecificQuirksEnabled"))
1665
b248526d3a1b Reworked some stuff in the web browser to use Qt resources.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1651
diff changeset
413
1965
96f5a76e1845 Fixed some PEP-8 related issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1963
diff changeset
414 QWebSecurityOrigin.addLocalScheme("eric")
1337
95ceea538e4c Started to implement a few more browser options for the eric web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1232
diff changeset
415
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
416 def __initActions(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
417 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
418 Private method to define the user interface actions.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
419 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
420 # list of all actions
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
421 self.__actions = []
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
422
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
423 self.newTabAct = E5Action(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
424 self.trUtf8('New Tab'),
638
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
425 UI.PixmapCache.getIcon("tabNew.png"),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
426 self.trUtf8('&New Tab'),
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
427 QKeySequence(self.trUtf8("Ctrl+T", "File|New Tab")),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
428 0, self, 'help_file_new_tab')
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
429 self.newTabAct.setStatusTip(self.trUtf8('Open a new help window tab'))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
430 self.newTabAct.setWhatsThis(self.trUtf8(
3035
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
431 """<b>New Tab</b>"""
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
432 """<p>This opens a new help window tab.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
433 ))
638
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
434 if not self.initShortcutsOnly:
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
435 self.newTabAct.triggered[()].connect(self.newTab)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
436 self.__actions.append(self.newTabAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
437
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
438 self.newAct = E5Action(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
439 self.trUtf8('New Window'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
440 UI.PixmapCache.getIcon("newWindow.png"),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
441 self.trUtf8('New &Window'),
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
442 QKeySequence(self.trUtf8("Ctrl+N", "File|New Window")),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
443 0, self, 'help_file_new_window')
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
444 self.newAct.setStatusTip(self.trUtf8('Open a new help browser window'))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
445 self.newAct.setWhatsThis(self.trUtf8(
3035
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
446 """<b>New Window</b>"""
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
447 """<p>This opens a new help browser window.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
448 ))
638
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
449 if not self.initShortcutsOnly:
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
450 self.newAct.triggered[()].connect(self.newWindow)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
451 self.__actions.append(self.newAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
452
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
453 self.openAct = E5Action(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
454 self.trUtf8('Open File'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
455 UI.PixmapCache.getIcon("open.png"),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
456 self.trUtf8('&Open File'),
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
457 QKeySequence(self.trUtf8("Ctrl+O", "File|Open")),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
458 0, self, 'help_file_open')
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
459 self.openAct.setStatusTip(self.trUtf8('Open a help file for display'))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
460 self.openAct.setWhatsThis(self.trUtf8(
3035
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
461 """<b>Open File</b>"""
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
462 """<p>This opens a new help file for display."""
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
463 """ It pops up a file selection dialog.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
464 ))
638
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
465 if not self.initShortcutsOnly:
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
466 self.openAct.triggered[()].connect(self.__openFile)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
467 self.__actions.append(self.openAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
468
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
469 self.openTabAct = E5Action(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
470 self.trUtf8('Open File in New Tab'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
471 UI.PixmapCache.getIcon("openNewTab.png"),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
472 self.trUtf8('Open File in New &Tab'),
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
473 QKeySequence(self.trUtf8("Shift+Ctrl+O", "File|Open in new tab")),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
474 0, self, 'help_file_open_tab')
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 545
diff changeset
475 self.openTabAct.setStatusTip(
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
476 self.trUtf8('Open a help file for display in a new tab'))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
477 self.openTabAct.setWhatsThis(self.trUtf8(
3035
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
478 """<b>Open File in New Tab</b>"""
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
479 """<p>This opens a new help file for display in a new tab."""
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
480 """ It pops up a file selection dialog.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
481 ))
638
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
482 if not self.initShortcutsOnly:
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
483 self.openTabAct.triggered[()].connect(self.__openFileNewTab)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
484 self.__actions.append(self.openTabAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
485
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
486 self.saveAsAct = E5Action(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
487 self.trUtf8('Save As'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
488 UI.PixmapCache.getIcon("fileSaveAs.png"),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
489 self.trUtf8('&Save As...'),
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
490 QKeySequence(self.trUtf8("Shift+Ctrl+S", "File|Save As")),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
491 0, self, 'help_file_save_as')
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 545
diff changeset
492 self.saveAsAct.setStatusTip(
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
493 self.trUtf8('Save the current page to disk'))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
494 self.saveAsAct.setWhatsThis(self.trUtf8(
3035
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
495 """<b>Save As...</b>"""
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
496 """<p>Saves the current page to disk.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
497 ))
638
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
498 if not self.initShortcutsOnly:
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
499 self.saveAsAct.triggered[()].connect(self.__savePageAs)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
500 self.__actions.append(self.saveAsAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
501
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
502 self.savePageScreenAct = E5Action(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
503 self.trUtf8('Save Page Screen'),
2804
a331371462a3 Added the capability to save the visible part of the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2697
diff changeset
504 UI.PixmapCache.getIcon("fileSavePixmap.png"),
1620
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1602
diff changeset
505 self.trUtf8('Save Page Screen...'),
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1602
diff changeset
506 0, 0, self, 'help_file_save_page_screen')
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1602
diff changeset
507 self.savePageScreenAct.setStatusTip(
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1602
diff changeset
508 self.trUtf8('Save the current page as a screen shot'))
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1602
diff changeset
509 self.savePageScreenAct.setWhatsThis(self.trUtf8(
3035
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
510 """<b>Save Page Screen...</b>"""
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
511 """<p>Saves the current page as a screen shot.</p>"""
1620
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1602
diff changeset
512 ))
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1602
diff changeset
513 if not self.initShortcutsOnly:
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1602
diff changeset
514 self.savePageScreenAct.triggered[()].connect(self.__savePageScreen)
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1602
diff changeset
515 self.__actions.append(self.savePageScreenAct)
8172cc5d4dda Added code to save the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1602
diff changeset
516
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
517 self.saveVisiblePageScreenAct = E5Action(
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
518 self.trUtf8('Save Visible Page Screen'),
2804
a331371462a3 Added the capability to save the visible part of the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2697
diff changeset
519 UI.PixmapCache.getIcon("fileSaveVisiblePixmap.png"),
a331371462a3 Added the capability to save the visible part of the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2697
diff changeset
520 self.trUtf8('Save Visible Page Screen...'),
a331371462a3 Added the capability to save the visible part of the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2697
diff changeset
521 0, 0, self, 'help_file_save_visible_page_screen')
a331371462a3 Added the capability to save the visible part of the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2697
diff changeset
522 self.saveVisiblePageScreenAct.setStatusTip(
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
523 self.trUtf8('Save the visible part of the current page as a'
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
524 ' screen shot'))
2804
a331371462a3 Added the capability to save the visible part of the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2697
diff changeset
525 self.saveVisiblePageScreenAct.setWhatsThis(self.trUtf8(
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
526 """<b>Save Visible Page Screen...</b>"""
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
527 """<p>Saves the visible part of the current page as a"""
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
528 """ screen shot.</p>"""
2804
a331371462a3 Added the capability to save the visible part of the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2697
diff changeset
529 ))
a331371462a3 Added the capability to save the visible part of the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2697
diff changeset
530 if not self.initShortcutsOnly:
a331371462a3 Added the capability to save the visible part of the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2697
diff changeset
531 self.saveVisiblePageScreenAct.triggered[()].connect(
a331371462a3 Added the capability to save the visible part of the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2697
diff changeset
532 self.__saveVisiblePageScreen)
a331371462a3 Added the capability to save the visible part of the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2697
diff changeset
533 self.__actions.append(self.saveVisiblePageScreenAct)
a331371462a3 Added the capability to save the visible part of the current page as a screen shot.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2697
diff changeset
534
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
535 bookmarksManager = self.bookmarksManager()
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
536 self.importBookmarksAct = E5Action(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
537 self.trUtf8('Import Bookmarks'),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
538 self.trUtf8('&Import Bookmarks...'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
539 0, 0, self, 'help_file_import_bookmarks')
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 545
diff changeset
540 self.importBookmarksAct.setStatusTip(
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
541 self.trUtf8('Import bookmarks from other browsers'))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
542 self.importBookmarksAct.setWhatsThis(self.trUtf8(
3035
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
543 """<b>Import Bookmarks</b>"""
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
544 """<p>Import bookmarks from other browsers.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
545 ))
638
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
546 if not self.initShortcutsOnly:
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
547 self.importBookmarksAct.triggered[()].connect(
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
548 bookmarksManager.importBookmarks)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
549 self.__actions.append(self.importBookmarksAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
550
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
551 self.exportBookmarksAct = E5Action(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
552 self.trUtf8('Export Bookmarks'),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
553 self.trUtf8('&Export Bookmarks...'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
554 0, 0, self, 'help_file_export_bookmarks')
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 545
diff changeset
555 self.exportBookmarksAct.setStatusTip(
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
556 self.trUtf8('Export the bookmarks into a file'))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
557 self.exportBookmarksAct.setWhatsThis(self.trUtf8(
3035
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
558 """<b>Export Bookmarks</b>"""
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
559 """<p>Export the bookmarks into a file.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
560 ))
638
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
561 if not self.initShortcutsOnly:
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
562 self.exportBookmarksAct.triggered[()].connect(
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
563 bookmarksManager.exportBookmarks)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
564 self.__actions.append(self.exportBookmarksAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
565
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
566 self.printAct = E5Action(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
567 self.trUtf8('Print'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
568 UI.PixmapCache.getIcon("print.png"),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
569 self.trUtf8('&Print'),
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
570 QKeySequence(self.trUtf8("Ctrl+P", "File|Print")),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
571 0, self, 'help_file_print')
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
572 self.printAct.setStatusTip(self.trUtf8('Print the displayed help'))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
573 self.printAct.setWhatsThis(self.trUtf8(
3035
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
574 """<b>Print</b>"""
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
575 """<p>Print the displayed help text.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
576 ))
638
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
577 if not self.initShortcutsOnly:
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
578 self.printAct.triggered[()].connect(self.tabWidget.printBrowser)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
579 self.__actions.append(self.printAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
580
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
581 self.printPdfAct = E5Action(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
582 self.trUtf8('Print as PDF'),
314
c1379cab7697 Added action to print to PDF to the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 313
diff changeset
583 UI.PixmapCache.getIcon("printPdf.png"),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
584 self.trUtf8('Print as PDF'),
314
c1379cab7697 Added action to print to PDF to the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 313
diff changeset
585 0, 0, self, 'help_file_print_pdf')
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
586 self.printPdfAct.setStatusTip(self.trUtf8(
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
587 'Print the displayed help as PDF'))
314
c1379cab7697 Added action to print to PDF to the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 313
diff changeset
588 self.printPdfAct.setWhatsThis(self.trUtf8(
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
589 """<b>Print as PDF</b>"""
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
590 """<p>Print the displayed help text as a PDF file.</p>"""
314
c1379cab7697 Added action to print to PDF to the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 313
diff changeset
591 ))
638
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
592 if not self.initShortcutsOnly:
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
593 self.printPdfAct.triggered[()].connect(
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
594 self.tabWidget.printBrowserPdf)
314
c1379cab7697 Added action to print to PDF to the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 313
diff changeset
595 self.__actions.append(self.printPdfAct)
c1379cab7697 Added action to print to PDF to the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 313
diff changeset
596
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
597 self.printPreviewAct = E5Action(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
598 self.trUtf8('Print Preview'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
599 UI.PixmapCache.getIcon("printPreview.png"),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
600 self.trUtf8('Print Preview'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
601 0, 0, self, 'help_file_print_preview')
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
602 self.printPreviewAct.setStatusTip(self.trUtf8(
3035
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
603 'Print preview of the displayed help'))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
604 self.printPreviewAct.setWhatsThis(self.trUtf8(
3035
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
605 """<b>Print Preview</b>"""
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
606 """<p>Print preview of the displayed help text.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
607 ))
638
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
608 if not self.initShortcutsOnly:
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
609 self.printPreviewAct.triggered[()].connect(
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
610 self.tabWidget.printPreviewBrowser)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
611 self.__actions.append(self.printPreviewAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
612
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
613 self.closeAct = E5Action(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
614 self.trUtf8('Close'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
615 UI.PixmapCache.getIcon("close.png"),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
616 self.trUtf8('&Close'),
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
617 QKeySequence(self.trUtf8("Ctrl+W", "File|Close")),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
618 0, self, 'help_file_close')
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
619 self.closeAct.setStatusTip(self.trUtf8(
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
620 'Close the current help window'))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
621 self.closeAct.setWhatsThis(self.trUtf8(
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
622 """<b>Close</b>"""
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
623 """<p>Closes the current help window.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
624 ))
638
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
625 if not self.initShortcutsOnly:
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
626 self.closeAct.triggered[()].connect(self.tabWidget.closeBrowser)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
627 self.__actions.append(self.closeAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
628
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
629 self.closeAllAct = E5Action(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
630 self.trUtf8('Close All'),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
631 self.trUtf8('Close &All'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
632 0, 0, self, 'help_file_close_all')
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
633 self.closeAllAct.setStatusTip(self.trUtf8('Close all help windows'))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
634 self.closeAllAct.setWhatsThis(self.trUtf8(
3035
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
635 """<b>Close All</b>"""
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
636 """<p>Closes all help windows except the first one.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
637 ))
638
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
638 if not self.initShortcutsOnly:
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
639 self.closeAllAct.triggered[()].connect(
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
640 self.tabWidget.closeAllBrowsers)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
641 self.__actions.append(self.closeAllAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
642
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
643 self.privateBrowsingAct = E5Action(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
644 self.trUtf8('Private Browsing'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
645 UI.PixmapCache.getIcon("privateBrowsing.png"),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
646 self.trUtf8('Private &Browsing'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
647 0, 0, self, 'help_file_private_browsing')
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
648 self.privateBrowsingAct.setStatusTip(self.trUtf8('Private Browsing'))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
649 self.privateBrowsingAct.setWhatsThis(self.trUtf8(
3035
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
650 """<b>Private Browsing</b>"""
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
651 """<p>Enables private browsing. In this mode no history is"""
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
652 """ recorded anymore.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
653 ))
638
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
654 if not self.initShortcutsOnly:
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
655 self.privateBrowsingAct.triggered[()].connect(
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
656 self.__privateBrowsing)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
657 self.privateBrowsingAct.setCheckable(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
658 self.__actions.append(self.privateBrowsingAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
659
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
660 self.exitAct = E5Action(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
661 self.trUtf8('Quit'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
662 UI.PixmapCache.getIcon("exit.png"),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
663 self.trUtf8('&Quit'),
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
664 QKeySequence(self.trUtf8("Ctrl+Q", "File|Quit")),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
665 0, self, 'help_file_quit')
1232
ed31e909cf2e Harmonisation of some display strings related to the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1196
diff changeset
666 self.exitAct.setStatusTip(self.trUtf8('Quit the eric5 Web Browser'))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
667 self.exitAct.setWhatsThis(self.trUtf8(
3035
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
668 """<b>Quit</b>"""
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
669 """<p>Quit the eric5 Web Browser.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
670 ))
638
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
671 if not self.initShortcutsOnly:
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
672 if self.fromEric:
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
673 self.exitAct.triggered[()].connect(self.close)
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
674 else:
1651
bc68f24d5658 Added the ClickToFlash plug-in to (temporarily) block Flash and related content.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1645
diff changeset
675 self.exitAct.triggered[()].connect(self.__closeAllWindows)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
676 self.__actions.append(self.exitAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
677
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
678 self.backAct = E5Action(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
679 self.trUtf8('Backward'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
680 UI.PixmapCache.getIcon("back.png"),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
681 self.trUtf8('&Backward'),
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
682 QKeySequence(self.trUtf8("Alt+Left", "Go|Backward")),
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
683 QKeySequence(self.trUtf8("Backspace", "Go|Backward")),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
684 self, 'help_go_backward')
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
685 self.backAct.setStatusTip(self.trUtf8('Move one help screen backward'))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
686 self.backAct.setWhatsThis(self.trUtf8(
3035
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
687 """<b>Backward</b>"""
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
688 """<p>Moves one help screen backward. If none is"""
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
689 """ available, this action is disabled.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
690 ))
638
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
691 if not self.initShortcutsOnly:
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
692 self.backAct.triggered[()].connect(self.__backward)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
693 self.__actions.append(self.backAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
694
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
695 self.forwardAct = E5Action(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
696 self.trUtf8('Forward'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
697 UI.PixmapCache.getIcon("forward.png"),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
698 self.trUtf8('&Forward'),
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
699 QKeySequence(self.trUtf8("Alt+Right", "Go|Forward")),
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
700 QKeySequence(self.trUtf8("Shift+Backspace", "Go|Forward")),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
701 self, 'help_go_foreward')
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
702 self.forwardAct.setStatusTip(self.trUtf8(
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
703 'Move one help screen forward'))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
704 self.forwardAct.setWhatsThis(self.trUtf8(
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
705 """<b>Forward</b>"""
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
706 """<p>Moves one help screen forward. If none is"""
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
707 """ available, this action is disabled.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
708 ))
638
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
709 if not self.initShortcutsOnly:
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
710 self.forwardAct.triggered[()].connect(self.__forward)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
711 self.__actions.append(self.forwardAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
712
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
713 self.homeAct = E5Action(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
714 self.trUtf8('Home'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
715 UI.PixmapCache.getIcon("home.png"),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
716 self.trUtf8('&Home'),
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
717 QKeySequence(self.trUtf8("Ctrl+Home", "Go|Home")),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
718 0, self, 'help_go_home')
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
719 self.homeAct.setStatusTip(self.trUtf8(
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
720 'Move to the initial help screen'))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
721 self.homeAct.setWhatsThis(self.trUtf8(
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
722 """<b>Home</b>"""
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
723 """<p>Moves to the initial help screen.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
724 ))
638
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
725 if not self.initShortcutsOnly:
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
726 self.homeAct.triggered[()].connect(self.__home)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
727 self.__actions.append(self.homeAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
728
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
729 self.reloadAct = E5Action(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
730 self.trUtf8('Reload'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
731 UI.PixmapCache.getIcon("reload.png"),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
732 self.trUtf8('&Reload'),
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
733 QKeySequence(self.trUtf8("Ctrl+R", "Go|Reload")),
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
734 QKeySequence(self.trUtf8("F5", "Go|Reload")),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
735 self, 'help_go_reload')
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
736 self.reloadAct.setStatusTip(self.trUtf8(
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
737 'Reload the current help screen'))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
738 self.reloadAct.setWhatsThis(self.trUtf8(
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
739 """<b>Reload</b>"""
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
740 """<p>Reloads the current help screen.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
741 ))
638
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
742 if not self.initShortcutsOnly:
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
743 self.reloadAct.triggered[()].connect(self.__reload)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
744 self.__actions.append(self.reloadAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
745
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
746 self.stopAct = E5Action(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
747 self.trUtf8('Stop'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
748 UI.PixmapCache.getIcon("stopLoading.png"),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
749 self.trUtf8('&Stop'),
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
750 QKeySequence(self.trUtf8("Ctrl+.", "Go|Stop")),
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
751 QKeySequence(self.trUtf8("Esc", "Go|Stop")),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
752 self, 'help_go_stop')
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
753 self.stopAct.setStatusTip(self.trUtf8('Stop loading'))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
754 self.stopAct.setWhatsThis(self.trUtf8(
3035
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
755 """<b>Stop</b>"""
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
756 """<p>Stops loading of the current tab.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
757 ))
638
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
758 if not self.initShortcutsOnly:
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
759 self.stopAct.triggered[()].connect(self.__stopLoading)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
760 self.__actions.append(self.stopAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
761
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
762 self.copyAct = E5Action(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
763 self.trUtf8('Copy'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
764 UI.PixmapCache.getIcon("editCopy.png"),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
765 self.trUtf8('&Copy'),
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
766 QKeySequence(self.trUtf8("Ctrl+C", "Edit|Copy")),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
767 0, self, 'help_edit_copy')
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
768 self.copyAct.setStatusTip(self.trUtf8('Copy the selected text'))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
769 self.copyAct.setWhatsThis(self.trUtf8(
3035
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
770 """<b>Copy</b>"""
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
771 """<p>Copy the selected text to the clipboard.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
772 ))
638
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
773 if not self.initShortcutsOnly:
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
774 self.copyAct.triggered[()].connect(self.__copy)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
775 self.__actions.append(self.copyAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
776
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
777 self.findAct = E5Action(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
778 self.trUtf8('Find...'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
779 UI.PixmapCache.getIcon("find.png"),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
780 self.trUtf8('&Find...'),
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
781 QKeySequence(self.trUtf8("Ctrl+F", "Edit|Find")),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
782 0, self, 'help_edit_find')
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
783 self.findAct.setStatusTip(self.trUtf8('Find text in page'))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
784 self.findAct.setWhatsThis(self.trUtf8(
3035
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
785 """<b>Find</b>"""
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
786 """<p>Find text in the current page.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
787 ))
638
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
788 if not self.initShortcutsOnly:
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
789 self.findAct.triggered[()].connect(self.__find)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
790 self.__actions.append(self.findAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
791
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
792 self.findNextAct = E5Action(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
793 self.trUtf8('Find next'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
794 UI.PixmapCache.getIcon("findNext.png"),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
795 self.trUtf8('Find &next'),
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
796 QKeySequence(self.trUtf8("F3", "Edit|Find next")),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
797 0, self, 'help_edit_find_next')
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
798 self.findNextAct.setStatusTip(self.trUtf8(
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
799 'Find next occurrence of text in page'))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
800 self.findNextAct.setWhatsThis(self.trUtf8(
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
801 """<b>Find next</b>"""
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
802 """<p>Find the next occurrence of text in the current page.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
803 ))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
804 if not self.initShortcutsOnly:
454
d28d558f7484 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 453
diff changeset
805 self.findNextAct.triggered[()].connect(self.findDlg.findNext)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
806 self.__actions.append(self.findNextAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
807
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
808 self.findPrevAct = E5Action(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
809 self.trUtf8('Find previous'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
810 UI.PixmapCache.getIcon("findPrev.png"),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
811 self.trUtf8('Find &previous'),
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
812 QKeySequence(self.trUtf8("Shift+F3", "Edit|Find previous")),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
813 0, self, 'help_edit_find_previous')
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 545
diff changeset
814 self.findPrevAct.setStatusTip(
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
815 self.trUtf8('Find previous occurrence of text in page'))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
816 self.findPrevAct.setWhatsThis(self.trUtf8(
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
817 """<b>Find previous</b>"""
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
818 """<p>Find the previous occurrence of text in the current"""
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
819 """ page.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
820 ))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
821 if not self.initShortcutsOnly:
454
d28d558f7484 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 453
diff changeset
822 self.findPrevAct.triggered[()].connect(self.findDlg.findPrevious)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
823 self.__actions.append(self.findPrevAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
824
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
825 self.bookmarksManageAct = E5Action(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
826 self.trUtf8('Manage Bookmarks'),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
827 self.trUtf8('&Manage Bookmarks...'),
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
828 QKeySequence(self.trUtf8("Ctrl+Shift+B", "Help|Manage bookmarks")),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
829 0, self, 'help_bookmarks_manage')
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
830 self.bookmarksManageAct.setStatusTip(self.trUtf8(
3035
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
831 'Open a dialog to manage the bookmarks.'))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
832 self.bookmarksManageAct.setWhatsThis(self.trUtf8(
3035
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
833 """<b>Manage Bookmarks...</b>"""
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
834 """<p>Open a dialog to manage the bookmarks.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
835 ))
638
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
836 if not self.initShortcutsOnly:
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
837 self.bookmarksManageAct.triggered[()].connect(
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
838 self.__showBookmarksDialog)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
839 self.__actions.append(self.bookmarksManageAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
840
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
841 self.bookmarksAddAct = E5Action(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
842 self.trUtf8('Add Bookmark'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
843 UI.PixmapCache.getIcon("addBookmark.png"),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
844 self.trUtf8('Add &Bookmark...'),
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
845 QKeySequence(self.trUtf8("Ctrl+D", "Help|Add bookmark")),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
846 0, self, 'help_bookmark_add')
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
847 self.bookmarksAddAct.setIconVisibleInMenu(False)
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
848 self.bookmarksAddAct.setStatusTip(self.trUtf8(
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
849 'Open a dialog to add a bookmark.'))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
850 self.bookmarksAddAct.setWhatsThis(self.trUtf8(
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
851 """<b>Add Bookmark</b>"""
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
852 """<p>Open a dialog to add the current URL as a bookmark.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
853 ))
638
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
854 if not self.initShortcutsOnly:
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
855 self.bookmarksAddAct.triggered[()].connect(self.__addBookmark)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
856 self.__actions.append(self.bookmarksAddAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
857
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
858 self.bookmarksAddFolderAct = E5Action(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
859 self.trUtf8('Add Folder'),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
860 self.trUtf8('Add &Folder...'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
861 0, 0, self, 'help_bookmark_show_all')
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
862 self.bookmarksAddFolderAct.setStatusTip(self.trUtf8(
3035
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
863 'Open a dialog to add a new bookmarks folder.'))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
864 self.bookmarksAddFolderAct.setWhatsThis(self.trUtf8(
3035
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
865 """<b>Add Folder...</b>"""
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
866 """<p>Open a dialog to add a new bookmarks folder.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
867 ))
638
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
868 if not self.initShortcutsOnly:
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
869 self.bookmarksAddFolderAct.triggered[()].connect(
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
870 self.__addBookmarkFolder)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
871 self.__actions.append(self.bookmarksAddFolderAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
872
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
873 self.bookmarksAllTabsAct = E5Action(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
874 self.trUtf8('Bookmark All Tabs'),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
875 self.trUtf8('Bookmark All Tabs...'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
876 0, 0, self, 'help_bookmark_all_tabs')
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
877 self.bookmarksAllTabsAct.setStatusTip(self.trUtf8(
3035
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
878 'Bookmark all open tabs.'))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
879 self.bookmarksAllTabsAct.setWhatsThis(self.trUtf8(
3035
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
880 """<b>Bookmark All Tabs...</b>"""
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
881 """<p>Open a dialog to add a new bookmarks folder for"""
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
882 """ all open tabs.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
883 ))
638
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
884 if not self.initShortcutsOnly:
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
885 self.bookmarksAllTabsAct.triggered[()].connect(self.bookmarkAll)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
886 self.__actions.append(self.bookmarksAllTabsAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
887
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
888 self.whatsThisAct = E5Action(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
889 self.trUtf8('What\'s This?'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
890 UI.PixmapCache.getIcon("whatsThis.png"),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
891 self.trUtf8('&What\'s This?'),
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
892 QKeySequence(self.trUtf8("Shift+F1", "Help|What's This?'")),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
893 0, self, 'help_help_whats_this')
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
894 self.whatsThisAct.setStatusTip(self.trUtf8('Context sensitive help'))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
895 self.whatsThisAct.setWhatsThis(self.trUtf8(
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
896 """<b>Display context sensitive help</b>"""
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
897 """<p>In What's This? mode, the mouse cursor shows an arrow"""
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
898 """ with a question mark, and you can click on the interface"""
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
899 """ elements to get a short description of what they do and how"""
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
900 """ to use them. In dialogs, this feature can be accessed using"""
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
901 """ the context help button in the titlebar.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
902 ))
638
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
903 if not self.initShortcutsOnly:
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
904 self.whatsThisAct.triggered[()].connect(self.__whatsThis)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
905 self.__actions.append(self.whatsThisAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
906
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
907 self.aboutAct = E5Action(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
908 self.trUtf8('About'),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
909 self.trUtf8('&About'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
910 0, 0, self, 'help_help_about')
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
911 self.aboutAct.setStatusTip(self.trUtf8(
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
912 'Display information about this software'))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
913 self.aboutAct.setWhatsThis(self.trUtf8(
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
914 """<b>About</b>"""
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
915 """<p>Display some information about this software.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
916 ))
638
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
917 if not self.initShortcutsOnly:
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
918 self.aboutAct.triggered[()].connect(self.__about)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
919 self.__actions.append(self.aboutAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
920
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
921 self.aboutQtAct = E5Action(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
922 self.trUtf8('About Qt'),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
923 self.trUtf8('About &Qt'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
924 0, 0, self, 'help_help_about_qt')
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 545
diff changeset
925 self.aboutQtAct.setStatusTip(
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
926 self.trUtf8('Display information about the Qt toolkit'))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
927 self.aboutQtAct.setWhatsThis(self.trUtf8(
3035
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
928 """<b>About Qt</b>"""
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
929 """<p>Display some information about the Qt toolkit.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
930 ))
638
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
931 if not self.initShortcutsOnly:
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
932 self.aboutQtAct.triggered[()].connect(self.__aboutQt)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
933 self.__actions.append(self.aboutQtAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
934
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
935 self.zoomInAct = E5Action(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
936 self.trUtf8('Zoom in'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
937 UI.PixmapCache.getIcon("zoomIn.png"),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
938 self.trUtf8('Zoom &in'),
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
939 QKeySequence(self.trUtf8("Ctrl++", "View|Zoom in")),
1520
25d97c7ea897 Added an alternate shortcut for zooming.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
940 QKeySequence(self.trUtf8("Zoom In", "View|Zoom in")),
25d97c7ea897 Added an alternate shortcut for zooming.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
941 self, 'help_view_zoom_in')
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
942 self.zoomInAct.setStatusTip(self.trUtf8('Zoom in on the text'))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
943 self.zoomInAct.setWhatsThis(self.trUtf8(
3035
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
944 """<b>Zoom in</b>"""
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
945 """<p>Zoom in on the text. This makes the text bigger.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
946 ))
638
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
947 if not self.initShortcutsOnly:
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
948 self.zoomInAct.triggered[()].connect(self.__zoomIn)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
949 self.__actions.append(self.zoomInAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
950
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
951 self.zoomOutAct = E5Action(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
952 self.trUtf8('Zoom out'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
953 UI.PixmapCache.getIcon("zoomOut.png"),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
954 self.trUtf8('Zoom &out'),
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
955 QKeySequence(self.trUtf8("Ctrl+-", "View|Zoom out")),
1520
25d97c7ea897 Added an alternate shortcut for zooming.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
956 QKeySequence(self.trUtf8("Zoom Out", "View|Zoom out")),
25d97c7ea897 Added an alternate shortcut for zooming.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
957 self, 'help_view_zoom_out')
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
958 self.zoomOutAct.setStatusTip(self.trUtf8('Zoom out on the text'))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
959 self.zoomOutAct.setWhatsThis(self.trUtf8(
3035
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
960 """<b>Zoom out</b>"""
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
961 """<p>Zoom out on the text. This makes the text smaller.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
962 ))
638
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
963 if not self.initShortcutsOnly:
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
964 self.zoomOutAct.triggered[()].connect(self.__zoomOut)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
965 self.__actions.append(self.zoomOutAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
966
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
967 self.zoomResetAct = E5Action(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
968 self.trUtf8('Zoom reset'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
969 UI.PixmapCache.getIcon("zoomReset.png"),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
970 self.trUtf8('Zoom &reset'),
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
971 QKeySequence(self.trUtf8("Ctrl+0", "View|Zoom reset")),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
972 0, self, 'help_view_zoom_reset')
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
973 self.zoomResetAct.setStatusTip(self.trUtf8(
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
974 'Reset the zoom of the text'))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
975 self.zoomResetAct.setWhatsThis(self.trUtf8(
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
976 """<b>Zoom reset</b>"""
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
977 """<p>Reset the zoom of the text. """
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
978 """This sets the zoom factor to 100%.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
979 ))
638
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
980 if not self.initShortcutsOnly:
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
981 self.zoomResetAct.triggered[()].connect(self.__zoomReset)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
982 self.__actions.append(self.zoomResetAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
983
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
984 if hasattr(QWebSettings, 'ZoomTextOnly'):
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
985 self.zoomTextOnlyAct = E5Action(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
986 self.trUtf8('Zoom text only'),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
987 self.trUtf8('Zoom &text only'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
988 0, 0, self, 'help_view_zoom_text_only')
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
989 self.zoomTextOnlyAct.setCheckable(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
990 self.zoomTextOnlyAct.setStatusTip(self.trUtf8(
3035
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
991 'Zoom text only; pictures remain constant'))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
992 self.zoomTextOnlyAct.setWhatsThis(self.trUtf8(
3035
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
993 """<b>Zoom text only</b>"""
36e9f388958b Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
994 """<p>Zoom text only; pictures remain constant.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
995 ))
638
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
996 if not self.initShortcutsOnly:
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
997 self.zoomTextOnlyAct.triggered[bool].connect(
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
998 self.__zoomTextOnly)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
999 self.__actions.append(self.zoomTextOnlyAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1000 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1001 self.zoomTextOnlyAct = None
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1002
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1003 self.pageSourceAct = E5Action(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1004 self.trUtf8('Show page source'),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
1005 self.trUtf8('Show page source'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1006 QKeySequence(self.trUtf8('Ctrl+U')), 0,
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1007 self, 'help_show_page_source')
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
1008 self.pageSourceAct.setStatusTip(self.trUtf8(
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
1009 'Show the page source in an editor'))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1010 self.pageSourceAct.setWhatsThis(self.trUtf8(
2999
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
1011 """<b>Show page source</b>"""
28c75409a78f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2831
diff changeset
1012 """<p>Show the page source in an editor.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1013 ))
638
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
1014 if not self.initShortcutsOnly:
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
1015 self.pageSourceAct.triggered[()].connect(self.__showPageSource)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1016 self.__actions.append(self.pageSourceAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1017 self.addAction(self.pageSourceAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1018
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1019 self.fullScreenAct = E5Action(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1020 self.trUtf8('Full Screen'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1021 UI.PixmapCache.getIcon("windowFullscreen.png"),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
1022 self.trUtf8('&Full Screen'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1023 QKeySequence(self.trUtf8('F11')), 0,
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1024 self, 'help_view_full_scree')
638
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
1025 if not self.initShortcutsOnly:
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
1026 self.fullScreenAct.triggered[()].connect(self.__viewFullScreen)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1027 self.__actions.append(self.fullScreenAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1028 self.addAction(self.fullScreenAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1029
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1030 self.nextTabAct = E5Action(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1031 self.trUtf8('Show next tab'),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
1032 self.trUtf8('Show next tab'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1033 QKeySequence(self.trUtf8('Ctrl+Alt+Tab')), 0,
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1034 self, 'help_view_next_tab')
638
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
1035 if not self.initShortcutsOnly:
265c31231d9d Did some refactoring of the web browser code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 637
diff changeset
1036 self.nextTabAct.triggered[()].connect(self.__nextTab)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1037 self.__actions.append(self.nextTabAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1038 self.addAction(self.nextTabAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1039
3022
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1040 self.prevTabAct = E5Action(
57179e4cdadd Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1041 self.trUtf8('Show previous tab'),
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
1042 self.trUtf8('Show previous tab'),