Helpviewer/HelpWindow.py

changeset 1781
34a44041c4cb
parent 1733
231e6f05d274
child 1853
01812b281a1e
--- a/Helpviewer/HelpWindow.py	Wed Apr 11 19:11:49 2012 +0200
+++ b/Helpviewer/HelpWindow.py	Thu Apr 12 19:06:03 2012 +0200
@@ -2657,6 +2657,11 @@
         @return icon for the URL (QIcon)
         """
         icon = HelpWindow.__getWebIcon(url)
+        if icon.isNull():
+            hostUrl = QUrl()
+            hostUrl.setScheme(url.scheme())
+            hostUrl.setHost(url.host())
+            icon = HelpWindow.__getWebIcon(hostUrl)
         
         if icon.isNull():
             pixmap = QWebSettings.webGraphic(QWebSettings.DefaultFrameIconGraphic)
@@ -2675,6 +2680,16 @@
         @param url URL to get icon for (QUrl)
         @return icon for the URL (QIcon)
         """
+        scheme = url.scheme()
+        if scheme in ["eric", "about"]:
+            return UI.PixmapCache.getIcon("ericWeb.png")
+        elif scheme == "qthelp":
+            return UI.PixmapCache.getIcon("qthelp.png")
+        elif scheme == "file":
+            return UI.PixmapCache.getIcon("fileMisc.png")
+        elif scheme == "abp":
+            return UI.PixmapCache.getIcon("adBlockPlus.png")
+        
         icon = QWebSettings.iconForUrl(url)
         if icon.isNull():
             # try again

eric ide

mercurial