Sun, 20 Mar 2011 18:18:12 +0100
Added support for search schemes ("s:" or "search:") and "about:home" to the web browser.
--- a/Helpviewer/HelpTabWidget.py Sun Mar 20 17:10:35 2011 +0100 +++ b/Helpviewer/HelpTabWidget.py Sun Mar 20 18:18:12 2011 +0100 @@ -665,10 +665,11 @@ Private slot to handle the entering of an URL. """ edit = self.sender() + url = self.__guessUrlFromPath(edit.text()) if e5App().keyboardModifiers() == Qt.AltModifier: - self.newBrowser(edit.text()) + self.newBrowser(url) else: - self.currentBrowser().setSource(QUrl(edit.text())) + self.currentBrowser().setSource(url) self.currentBrowser().setFocus() def __pathSelected(self, path): @@ -694,9 +695,25 @@ return url try: - return QUrl.fromUserInput(path) + url = QUrl.fromUserInput(path) except AttributeError: - return QUrl(path) + url = QUrl(path) + + if url.scheme() == "about" and \ + url.path() == "home": + url = QUrl("pyrc:home") + + if url.scheme() in ["s", "search"]: + url = manager.currentEngine().searchUrl(url.path().strip()) + + if url.scheme() != "" and \ + (url.host() != "" or url.path() != ""): + return url + + urlString = Preferences.getHelp("DefaultScheme") + path.strip() + url = QUrl.fromEncoded(urlString.encode(), QUrl.TolerantMode) + + return url def __currentChanged(self, index): """
--- a/changelog Sun Mar 20 17:10:35 2011 +0100 +++ b/changelog Sun Mar 20 18:18:12 2011 +0100 @@ -15,6 +15,8 @@ (as of QScintilla 2.5) - added support for new lexer properties (as of QScintilla 2.5) - added support for access keys and drag & drop to the web browser +- added support for search schemes ("s:" or "search:") and "about:home" to + the web browser Version 5.1-snapshot-20110123: - bug fixes