Continued porting the web browser. QtWebEngine

Wed, 16 Mar 2016 19:55:09 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 16 Mar 2016 19:55:09 +0100
branch
QtWebEngine
changeset 4864
00a215a67f25
parent 4863
9d86824898e1
child 4865
4adc526bc4b3

Continued porting the web browser.

- few cleanups

Preferences/__init__.py file | annotate | diff | comparison | revisions
WebBrowser/WebBrowserPage.py file | annotate | diff | comparison | revisions
--- a/Preferences/__init__.py	Wed Mar 16 19:51:00 2016 +0100
+++ b/Preferences/__init__.py	Wed Mar 16 19:55:09 2016 +0100
@@ -1012,10 +1012,8 @@
         "SingleWebBrowserWindow": True,
         "SaveGeometry": True,
         "WebBrowserState": QByteArray(),
-##        "StartupBehavior": 1,      # show speed dial
-##        "HomePage": "eric:home",
-        "StartupBehavior": 0,      # show home page
-        "HomePage": "http://eric-ide.python-projects.org",     # TODO: eric: scheme
+        "StartupBehavior": 1,      # show speed dial
+        "HomePage": "eric:home",
         "WarnOnMultipleClose": True,
         "DefaultScheme": "https://",
         "UserStyleSheet": "",
--- a/WebBrowser/WebBrowserPage.py	Wed Mar 16 19:51:00 2016 +0100
+++ b/WebBrowser/WebBrowserPage.py	Wed Mar 16 19:55:09 2016 +0100
@@ -47,77 +47,6 @@
 except ImportError:
     SSL_AVAILABLE = False
 
-# TODO: ExternalJsObject: move this to the object
-###############################################################################
-##
-##
-##class JavaScriptEricObject(QObject):
-##    """
-##    Class implementing an external javascript object to search via the
-##    startpage.
-##    """
-##    # these must be in line with the strings used by the javascript part of
-##    # the start page
-##    translations = [
-##        QT_TRANSLATE_NOOP("JavaScriptEricObject",
-##                          "Welcome to eric6 Web Browser!"),
-##        QT_TRANSLATE_NOOP("JavaScriptEricObject", "eric6 Web Browser"),
-##        QT_TRANSLATE_NOOP("JavaScriptEricObject", "Search!"),
-##        QT_TRANSLATE_NOOP("JavaScriptEricObject", "About eric6"),
-##    ]
-##    
-##    def __init__(self, mw, parent=None):
-##        """
-##        Constructor
-##        
-##        @param mw reference to the main window 8HelpWindow)
-##        @param parent reference to the parent object (QObject)
-##        """
-##        super(JavaScriptEricObject, self).__init__(parent)
-##        
-##        self.__mw = mw
-##    
-##    @pyqtSlot(str, result=str)
-##    def translate(self, trans):
-##        """
-##        Public method to translate the given string.
-##        
-##        @param trans string to be translated (string)
-##        @return translation (string)
-##        """
-##        if trans == "QT_LAYOUT_DIRECTION":
-##            # special handling to detect layout direction
-##            if qApp.isLeftToRight():
-##                return "LTR"
-##            else:
-##                return "RTL"
-##        
-##        return self.tr(trans)
-##    
-##    @pyqtSlot(result=str)
-##    def providerString(self):
-##        """
-##        Public method to get a string for the search provider.
-##        
-##        @return string for the search provider (string)
-##        """
-##        return self.tr("Search results provided by {0}")\
-##            .format(self.__mw.openSearchManager().currentEngineName())
-##    
-##    @pyqtSlot(str, result=str)
-##    def searchUrl(self, searchStr):
-##        """
-##        Public method to get the search URL for the given search term.
-##        
-##        @param searchStr search term (string)
-##        @return search URL (string)
-##        """
-##        return bytes(
-##            self.__mw.openSearchManager().currentEngine()
-##            .searchUrl(searchStr).toEncoded()).decode()
-##
-###############################################################################
-
 
 class WebBrowserPage(QWebEnginePage):
     """

eric ide

mercurial