Continued porting the web browser. QtWebEngine

Sat, 05 Mar 2016 17:02:57 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 05 Mar 2016 17:02:57 +0100
branch
QtWebEngine
changeset 4807
5c87ef12aa6d
parent 4806
5c0745cb26ea
child 4808
328e613165fe

Continued porting the web browser.

- adjusted the shortcuts handling

Preferences/ConfigurationDialog.py file | annotate | diff | comparison | revisions
Preferences/ConfigurationPages/SecurityPage.py file | annotate | diff | comparison | revisions
Preferences/Shortcuts.py file | annotate | diff | comparison | revisions
WebBrowser/WebBrowserWindow.py file | annotate | diff | comparison | revisions
--- a/Preferences/ConfigurationDialog.py	Sat Mar 05 16:44:41 2016 +0100
+++ b/Preferences/ConfigurationDialog.py	Sat Mar 05 17:02:57 2016 +0100
@@ -123,7 +123,6 @@
                 e5App().registerObject("PluginManager", self.pluginManager)
         
         if displayMode == ConfigurationWidget.DefaultMode:
-            # TODO: add QtWebEngine based browser config pages to default mode
             self.configItems = {
                 # key : [display string, pixmap name, dialog module name or
                 #        page creation function, parent key,
--- a/Preferences/ConfigurationPages/SecurityPage.py	Sat Mar 05 16:44:41 2016 +0100
+++ b/Preferences/ConfigurationPages/SecurityPage.py	Sat Mar 05 17:02:57 2016 +0100
@@ -73,7 +73,6 @@
                         Preferences.getHelp("DnsPrefetchEnabled"))
             except ImportError:
                 self.dnsPrefetchCheckBox.setEnabled(False)
-        # TODO: add config for default Mode
         else:
             if self.__configDlg.isUsingWebEngine():
                 self.dnsPrefetchCheckBox.setEnabled(False)
--- a/Preferences/Shortcuts.py	Sat Mar 05 16:44:41 2016 +0100
+++ b/Preferences/Shortcuts.py	Sat Mar 05 17:02:57 2016 +0100
@@ -37,7 +37,8 @@
             act.setAlternateShortcut(QKeySequence(accel), removeEmpty=True)
 
 
-def readShortcuts(prefClass=Prefs, helpViewer=None, pluginName=None):
+def readShortcuts(prefClass=Prefs, helpViewer=None, pluginName=None,
+                  helpViewerCategory=""):
     """
     Module function to read the keyboard shortcuts for the defined QActions.
     
@@ -45,6 +46,7 @@
     @keyparam helpViewer reference to the help window object
     @keyparam pluginName name of the plugin for which to load shortcuts
         (string)
+    @keyparam helpViewerCategory name of the help viewer category (string)
     """
     if helpViewer is None and pluginName is None:
         for act in e5App().getObject("Project").getActions():
@@ -92,8 +94,10 @@
                     __readShortcut(act, category, prefClass)
     
     if helpViewer is not None:
+        if not helpViewerCategory:
+            helpViewerCategory = "HelpViewer"
         for act in helpViewer.getActions():
-            __readShortcut(act, "HelpViewer", prefClass)
+            __readShortcut(act, helpViewerCategory, prefClass)
     
     if pluginName is not None:
         try:
--- a/WebBrowser/WebBrowserWindow.py	Sat Mar 05 16:44:41 2016 +0100
+++ b/WebBrowser/WebBrowserWindow.py	Sat Mar 05 17:02:57 2016 +0100
@@ -1723,8 +1723,8 @@
         self.forwardAct.setEnabled(False)
         
         # now read the keyboard shortcuts for the actions
-        # TODO: shortcuts: change this to webBrowser
-        Shortcuts.readShortcuts(helpViewer=self)
+        Shortcuts.readShortcuts(
+            helpViewer=self, helpViewerCategory="webBrowser")
     
     def getActions(self):
         """

eric ide

mercurial