Helpviewer/Network/EricAccessHandler.py

changeset 5664
9b318fcb1ee2
parent 5389
9b1c800daff3
child 6048
82ad8ec9548c
equal deleted inserted replaced
5663:52a91f9a7a76 5664:9b318fcb1ee2
74 if self._speedDialPage is None: 74 if self._speedDialPage is None:
75 htmlFile = QFile(":/html/speeddialPage.html") 75 htmlFile = QFile(":/html/speeddialPage.html")
76 htmlFile.open(QFile.ReadOnly) 76 htmlFile.open(QFile.ReadOnly)
77 html = bytes(htmlFile.readAll()).decode() 77 html = bytes(htmlFile.readAll()).decode()
78 78
79 html = ( 79 html = html.replace("@FAVICON@", "qrc:icons/ericWeb16.png")
80 html.replace("@FAVICON@", "qrc:icons/ericWeb16.png") 80 html = html.replace("@IMG_PLUS@", "qrc:icons/plus.png")
81 .replace("@IMG_PLUS@", "qrc:icons/plus.png") 81 html = html.replace("@IMG_CLOSE@", "qrc:icons/close.png")
82 .replace("@IMG_CLOSE@", "qrc:icons/close.png") 82 html = html.replace("@IMG_EDIT@", "qrc:icons/edit.png")
83 .replace("@IMG_EDIT@", "qrc:icons/edit.png") 83 html = html.replace("@IMG_RELOAD@", "qrc:icons/reload.png")
84 .replace("@IMG_RELOAD@", "qrc:icons/reload.png") 84 html = html.replace("@IMG_SETTINGS@", "qrc:icons/setting.png")
85 .replace("@IMG_SETTINGS@", "qrc:icons/setting.png") 85 html = html.replace("@LOADING-IMG@", "qrc:icons/loading.gif")
86 .replace("@LOADING-IMG@", "qrc:icons/loading.gif") 86 html = html.replace("@BOX-BORDER@",
87 .replace("@BOX-BORDER@", "qrc:icons/box-border-small.png") 87 "qrc:icons/box-border-small.png")
88 88
89 .replace("@JQUERY@", "qrc:javascript/jquery.js") 89 html = html.replace("@JQUERY@", "qrc:javascript/jquery.js")
90 .replace("@JQUERY-UI@", "qrc:javascript/jquery-ui.js") 90 html = html.replace("@JQUERY-UI@", "qrc:javascript/jquery-ui.js")
91 91
92 .replace("@SITE-TITLE@", self.tr("Speed Dial")) 92 html = html.replace("@SITE-TITLE@", self.tr("Speed Dial"))
93 .replace("@URL@", self.tr("URL")) 93 html = html.replace("@URL@", self.tr("URL"))
94 .replace("@TITLE@", self.tr("Title")) 94 html = html.replace("@TITLE@", self.tr("Title"))
95 .replace("@APPLY@", self.tr("Apply")) 95 html = html.replace("@APPLY@", self.tr("Apply"))
96 .replace("@CLOSE@", self.tr("Close")) 96 html = html.replace("@CLOSE@", self.tr("Close"))
97 .replace("@NEW-PAGE@", self.tr("New Page")) 97 html = html.replace("@NEW-PAGE@", self.tr("New Page"))
98 .replace("@TITLE-EDIT@", self.tr("Edit")) 98 html = html.replace("@TITLE-EDIT@", self.tr("Edit"))
99 .replace("@TITLE-REMOVE@", self.tr("Remove")) 99 html = html.replace("@TITLE-REMOVE@", self.tr("Remove"))
100 .replace("@TITLE-RELOAD@", self.tr("Reload")) 100 html = html.replace("@TITLE-RELOAD@", self.tr("Reload"))
101 .replace("@TITLE-WARN@", 101 html = html.replace("@TITLE-WARN@",
102 self.tr("Are you sure to remove this speed dial?")) 102 self.tr("Are you sure to remove this"
103 .replace("@TITLE-WARN-REL@", 103 " speed dial?"))
104 self.tr("Are you sure you want to reload all speed" 104 html = html.replace("@TITLE-WARN-REL@",
105 " dials?")) 105 self.tr("Are you sure you want to reload"
106 .replace("@TITLE-FETCHTITLE@", 106 " all speed dials?"))
107 self.tr("Load title from page")) 107 html = html.replace("@TITLE-FETCHTITLE@",
108 .replace("@SETTINGS-TITLE@", 108 self.tr("Load title from page"))
109 self.tr("Speed Dial Settings")) 109 html = html.replace("@SETTINGS-TITLE@",
110 .replace("@ADD-TITLE@", self.tr("Add New Page")) 110 self.tr("Speed Dial Settings"))
111 .replace("@TXT_NRROWS@", 111 html = html.replace("@ADD-TITLE@", self.tr("Add New Page"))
112 self.tr("Maximum pages in a row:")) 112 html = html.replace("@TXT_NRROWS@",
113 .replace("@TXT_SDSIZE@", self.tr("Change size of pages:")) 113 self.tr("Maximum pages in a row:"))
114 ) 114 html = html.replace("@TXT_SDSIZE@",
115 self.tr("Change size of pages:"))
115 116
116 self._speedDialPage = Utilities.html_uencode(html) 117 self._speedDialPage = Utilities.html_uencode(html)
117 118
118 import Helpviewer.HelpWindow 119 import Helpviewer.HelpWindow
119 html = QByteArray(self._speedDialPage.encode("utf-8")) 120 html = QByteArray(self._speedDialPage.encode("utf-8"))

eric ide

mercurial