Helpviewer/Network/EricAccessHandler.py

branch
Py2 comp.
changeset 3057
10516539f238
parent 2525
8b507a9a2d40
parent 3002
6ffc581f00f1
child 3145
a9de05d4a22f
equal deleted inserted replaced
3056:9986ec0e559a 3057:10516539f238
23 23
24 def createRequest(self, op, request, outgoingData=None): 24 def createRequest(self, op, request, outgoingData=None):
25 """ 25 """
26 Protected method to create a request. 26 Protected method to create a request.
27 27
28 @param op the operation to be performed (QNetworkAccessManager.Operation) 28 @param op the operation to be performed
29 (QNetworkAccessManager.Operation)
29 @param request reference to the request object (QNetworkRequest) 30 @param request reference to the request object (QNetworkRequest)
30 @param outgoingData reference to an IODevice containing data to be sent 31 @param outgoingData reference to an IODevice containing data to be sent
31 (QIODevice) 32 (QIODevice)
32 @return reference to the created reply object (QNetworkReply) 33 @return reference to the created reply object (QNetworkReply)
33 """ 34 """
34 from .NetworkReply import NetworkReply 35 from .NetworkReply import NetworkReply
35 from .NetworkProtocolUnknownErrorReply import NetworkProtocolUnknownErrorReply 36 from .NetworkProtocolUnknownErrorReply import \
37 NetworkProtocolUnknownErrorReply
36 38
37 if request.url().toString() == "eric:home": 39 if request.url().toString() == "eric:home":
38 return NetworkReply(request, self.__createHomePage(), 40 return NetworkReply(request, self.__createHomePage(),
39 "text/html", self.parent()) 41 "text/html", self.parent())
40 elif request.url().toString() == "eric:speeddial": 42 elif request.url().toString() == "eric:speeddial":
90 html.replace("@APPLY@", self.trUtf8("Apply")) 92 html.replace("@APPLY@", self.trUtf8("Apply"))
91 html.replace("@NEW-PAGE@", self.trUtf8("New Page")) 93 html.replace("@NEW-PAGE@", self.trUtf8("New Page"))
92 html.replace("@TITLE-EDIT@", self.trUtf8("Edit")) 94 html.replace("@TITLE-EDIT@", self.trUtf8("Edit"))
93 html.replace("@TITLE-REMOVE@", self.trUtf8("Remove")) 95 html.replace("@TITLE-REMOVE@", self.trUtf8("Remove"))
94 html.replace("@TITLE-RELOAD@", self.trUtf8("Reload")) 96 html.replace("@TITLE-RELOAD@", self.trUtf8("Reload"))
95 html.replace("@TITLE-FETCHTITLE@", self.trUtf8("Load title from page")) 97 html.replace(
96 html.replace("@SETTINGS-TITLE@", self.trUtf8("Speed Dial Settings")) 98 "@TITLE-FETCHTITLE@", self.trUtf8("Load title from page"))
99 html.replace(
100 "@SETTINGS-TITLE@", self.trUtf8("Speed Dial Settings"))
97 html.replace("@ADD-TITLE@", self.trUtf8("Add New Page")) 101 html.replace("@ADD-TITLE@", self.trUtf8("Add New Page"))
98 html.replace("@TXT_NRROWS@", self.trUtf8("Maximum pages in a row:")) 102 html.replace(
103 "@TXT_NRROWS@", self.trUtf8("Maximum pages in a row:"))
99 html.replace("@TXT_SDSIZE@", self.trUtf8("Change size of pages:")) 104 html.replace("@TXT_SDSIZE@", self.trUtf8("Change size of pages:"))
100 105
101 self._speedDialPage = html 106 self._speedDialPage = html
102 107
103 import Helpviewer.HelpWindow 108 import Helpviewer.HelpWindow

eric ide

mercurial