Small modification to the start page.

Thu, 23 Feb 2012 16:48:19 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 23 Feb 2012 16:48:19 +0100
changeset 1664
863114db258e
parent 1662
dadf3f4ee800
child 1665
b248526d3a1b

Small modification to the start page.

Helpviewer/HTMLResources.py file | annotate | diff | comparison | revisions
Helpviewer/Network/PyrcAccessHandler.py file | annotate | diff | comparison | revisions
icons/default/ericWeb16.png file | annotate | diff | comparison | revisions
--- a/Helpviewer/HTMLResources.py	Thu Feb 23 16:15:09 2012 +0100
+++ b/Helpviewer/HTMLResources.py	Thu Feb 23 16:48:19 2012 +0100
@@ -125,6 +125,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
 <head>
     <title></title>
+    <link rel="icon" href="data:image/png;base64,@FAVICON@" type="image/x-icon" />
     <style>
 * {
     margin: 0;
@@ -234,7 +235,7 @@
 <body onload="document.forms[0].lineEdit.select(); update();">
     <div id="header">
         <h1 id="headerTitle"></h1>
-        <img src="data:image/png;base64,IMAGE_BINARY_DATA_HERE" width="32" height="32"/>
+        <img src="data:image/png;base64,@IMAGE@" width="32" height="32"/>
     </div>
     <div id="search">
         <form action="javascript:formSubmitted();">
--- a/Helpviewer/Network/PyrcAccessHandler.py	Thu Feb 23 16:15:09 2012 +0100
+++ b/Helpviewer/Network/PyrcAccessHandler.py	Thu Feb 23 16:48:19 2012 +0100
@@ -39,8 +39,14 @@
             imageBuffer = QBuffer()
             imageBuffer.open(QIODevice.ReadWrite)
             if pixmap.save(imageBuffer, "PNG"):
-                html = html.replace("IMAGE_BINARY_DATA_HERE",
-                             bytes(imageBuffer.buffer().toBase64()).decode())
+                html = html.replace("@IMAGE@",
+                    str(imageBuffer.buffer().toBase64(), encoding="ascii"))
+            pixmap = UI.PixmapCache.getPixmap("ericWeb16.png")
+            imageBuffer = QBuffer()
+            imageBuffer.open(QIODevice.ReadWrite)
+            if pixmap.save(imageBuffer, "PNG"):
+                html = html.replace("@FAVICON@",
+                    str(imageBuffer.buffer().toBase64(), encoding="ascii"))
             return NetworkReply(request, QByteArray(html), "text/html", self.parent())
         
         return NetworkProtocolUnknownErrorReply("pyrc", self.parent())
Binary file icons/default/ericWeb16.png has changed

eric ide

mercurial