Sun, 16 May 2010 19:57:46 +0200
Fixed a few Windows related issues.
Helpviewer/HelpWindow.py | file | annotate | diff | comparison | revisions | |
UI/UserInterface.py | file | annotate | diff | comparison | revisions |
--- a/Helpviewer/HelpWindow.py Sun May 16 18:47:30 2010 +0200 +++ b/Helpviewer/HelpWindow.py Sun May 16 19:57:46 2010 +0200 @@ -1424,6 +1424,7 @@ @return guessed URL (QUrl) """ manager = self.searchEdit.openSearchManager() + path = Utilities.fromNativeSeparators(path) url = manager.convertKeywordSearchToUrl(path) if url.isValid(): return url @@ -1545,7 +1546,11 @@ "All Files (*)" )) if fn: - self.currentBrowser().setSource(QUrl("file://" + fn)) + if Utilities.isWindowsPlatform(): + url = "file:///" + Utilities.fromNativeSeparators(fn) + else: + url = "file://" + fn + self.currentBrowser().setSource(QUrl(url)) def __openFileNewTab(self): """ @@ -1561,7 +1566,11 @@ "All Files (*)" )) if fn: - self.newTab("file://" + fn) + if Utilities.isWindowsPlatform(): + url = "file:///" + Utilities.fromNativeSeparators(fn) + else: + url = "file://" + fn + self.newTab(url) def __savePageAs(self): """
--- a/UI/UserInterface.py Sun May 16 18:47:30 2010 +0200 +++ b/UI/UserInterface.py Sun May 16 19:57:46 2010 +0200 @@ -4552,7 +4552,7 @@ """ home = Utilities.normjoinpath(getConfig('ericDocDir'), "Source", "index.html") - + if not home.startswith("http://") and \ not home.startswith("https://"): if not os.path.exists(home): @@ -4563,7 +4563,10 @@ .format(home)) return - home = "file://" + home + if Utilities.isWindowsPlatform(): + home = "file:///" + Utilities.fromNativeSeparators(home) + else: + home = "file://" + home hvType = Preferences.getHelp("HelpViewerType") if hvType == 1: