56 if self._homePage is None: |
56 if self._homePage is None: |
57 htmlFile = QFile(":/html/startPage.html") |
57 htmlFile = QFile(":/html/startPage.html") |
58 htmlFile.open(QFile.ReadOnly) |
58 htmlFile.open(QFile.ReadOnly) |
59 html = htmlFile.readAll() |
59 html = htmlFile.readAll() |
60 |
60 |
61 html.replace("@IMAGE@", "qrc:icons/ericWeb32.png") |
61 html.replace("@IMAGE@", b"qrc:icons/ericWeb32.png") |
62 html.replace("@FAVICON@", "qrc:icons/ericWeb16.png") |
62 html.replace("@FAVICON@", b"qrc:icons/ericWeb16.png") |
63 |
63 |
64 self._homePage = html |
64 self._homePage = html |
65 |
65 |
66 return QByteArray(self._homePage) |
66 return QByteArray(self._homePage) |
67 |
67 |
111 ) |
111 ) |
112 |
112 |
113 self._speedDialPage = Utilities.html_uencode(html) |
113 self._speedDialPage = Utilities.html_uencode(html) |
114 |
114 |
115 import Helpviewer.HelpWindow |
115 import Helpviewer.HelpWindow |
116 html = QByteArray(self._speedDialPage) |
116 html = QByteArray(self._speedDialPage.encode("utf-8")) |
117 dial = Helpviewer.HelpWindow.HelpWindow.speedDial() |
117 dial = Helpviewer.HelpWindow.HelpWindow.speedDial() |
118 |
118 |
119 html.replace("@INITIAL-SCRIPT@", dial.initialScript()) |
119 html.replace("@INITIAL-SCRIPT@", dial.initialScript().encode("utf-8")) |
120 html.replace("@ROW-PAGES@", str(dial.pagesInRow())) |
120 html.replace("@ROW-PAGES@", str(dial.pagesInRow()).encode("utf-8")) |
121 html.replace("@SD-SIZE@", str(dial.sdSize())) |
121 html.replace("@SD-SIZE@", str(dial.sdSize()).encode("utf-8")) |
122 |
122 |
123 return html |
123 return html |